use of org.alfresco.service.namespace.NamespaceServiceMemoryImpl in project alfresco-remote-api by Alfresco.
the class WorkflowModelBuilderTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
namespaceService = new NamespaceServiceMemoryImpl();
namespaceService.registerNamespace("test", URI);
namespaceService.registerNamespace(NamespaceService.CONTENT_MODEL_PREFIX, NamespaceService.CONTENT_MODEL_1_0_URI);
namespaceService.registerNamespace(NamespaceService.BPM_MODEL_PREFIX, NamespaceService.BPM_MODEL_1_0_URI);
personService = mock(PersonService.class);
when(personService.getPerson(userName)).thenReturn(person);
when(personService.personExists(userName)).thenReturn(true);
nodeService = mock(NodeService.class);
Map<QName, Serializable> personProps = new HashMap<QName, Serializable>();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, firstName);
personProps.put(ContentModel.PROP_LASTNAME, lastName);
when(nodeService.getProperties(person)).thenReturn(personProps);
when(nodeService.getProperty(person, ContentModel.PROP_USERNAME)).thenReturn(userName);
when(nodeService.getProperty(person, ContentModel.PROP_FIRSTNAME)).thenReturn(firstName);
when(nodeService.getProperty(person, ContentModel.PROP_LASTNAME)).thenReturn(lastName);
workflowService = mock(WorkflowService.class);
dictionaryService = mock(DictionaryService.class);
authenticationService = mock(AuthenticationService.class);
builder = new WorkflowModelBuilder(namespaceService, nodeService, authenticationService, personService, workflowService, dictionaryService);
}
Aggregations