1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.document;
17
18 import org.junit.Assert;
19 import org.junit.Test;
20 import org.kuali.rice.kew.api.exception.WorkflowException;
21 import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
22 import org.kuali.rice.krad.test.document.bo.AccountManager;
23 import org.kuali.rice.krad.test.BaseMaintenanceDocumentTest;
24
25
26
27
28
29
30 public class AccountManagerMaintenanceDocumentTest extends BaseMaintenanceDocumentTest {
31
32 @Override
33 protected Object getNewMaintainableObject() {
34 AccountManager am = new AccountManager();
35 am.setAmId(new Long(1));
36 am.setUserName("userName");
37 return am;
38 }
39
40 @Override
41 protected String getDocumentTypeName() {
42 return "AccountManagerMaintenanceDocument";
43 }
44
45 @Override
46 protected String getInitiatorPrincipalName() {
47 return "quickstart";
48 }
49
50 @Override
51 protected Object getOldMaintainableObject() {
52 return getNewMaintainableObject();
53 }
54
55 @Test
56
57
58
59
60 public void testRouteNewDoc() throws WorkflowException {
61 setupNewAccountMaintDoc(getDocument());
62 KRADServiceLocatorWeb.getDocumentService().routeDocument(getDocument(), "submit", null);
63 Assert.assertTrue(getDocument().getDocumentHeader().getWorkflowDocument().isFinal());
64 }
65 }