mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Implementation of RM-2614 +review RM
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/caveatmarkdatatype@114954 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,11 +21,16 @@ package org.alfresco.module.org_alfresco_module_rm.caveat.dao;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.CaveatException.MalformedConfiguration;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.scheme.CaveatGroup;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -39,6 +44,14 @@ public class CaveatDAOFromJSONUnitTest
|
||||
/** The class under test. */
|
||||
CaveatDAOFromJSON caveatDAOFromJSON = new CaveatDAOFromJSON();
|
||||
|
||||
@Before public void initClassUnderTest()
|
||||
{
|
||||
NamespaceService namespaceService = mock(NamespaceService.class);
|
||||
when(namespaceService.getNamespaceURI(anyString())).thenReturn("{mockedNamespace}");
|
||||
|
||||
caveatDAOFromJSON.setNamespaceService(namespaceService);
|
||||
}
|
||||
|
||||
/** Test that loading the default caveat configuration file doesn't throw any exceptions. */
|
||||
@Test
|
||||
public void testGetCaveatGroups_defaultConfiguration()
|
||||
|
Reference in New Issue
Block a user