1 package org.kuali.rice.kew.impl.document; 2 3 import org.junit.Before; 4 import org.junit.Test; 5 import org.kuali.rice.kew.api.KewApiServiceLocator; 6 import org.kuali.rice.kew.api.WorkflowDocument; 7 import org.kuali.rice.kew.api.WorkflowDocumentFactory; 8 import org.kuali.rice.kew.api.document.WorkflowDocumentService; 9 import org.kuali.rice.kew.test.KEWTestCase; 10 11 import static org.junit.Assert.assertEquals; 12 import static org.junit.Assert.assertNotNull; 13 14 public class WorkflowDocumentServiceImplTest extends KEWTestCase { 15 16 private WorkflowDocumentService workflowDocumentService; 17 18 @Before 19 public void setUpService() { 20 this.workflowDocumentService = KewApiServiceLocator.getWorkflowDocumentService(); 21 } 22 23 @Test 24 public void testGetDocumentTypeName() { 25 WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("admin"), "TestDocumentType"); 26 assertNotNull(document.getDocumentId()); 27 assertEquals("TestDocumentType", document.getDocumentTypeName()); 28 assertEquals("TestDocumentType", workflowDocumentService.getDocumentTypeName(document.getDocumentId())); 29 } 30 31 }