1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.location.web;
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.exception.ValidationException;
22 import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
23 import org.kuali.rice.location.api.country.Country;
24 import org.kuali.rice.location.impl.country.CountryBo;
25 import org.kuali.rice.test.BaselineTestCase;
26 import org.kuali.rice.krad.test.BaseMaintenanceDocumentTest;
27
28
29
30
31
32
33 public class CountryMaintenanceDocumentTest extends BaseMaintenanceDocumentTest {
34
35 @Override
36 protected Object getNewMaintainableObject() {
37 CountryBo country = new CountryBo();
38 country.setCode("KE");
39
40 return country;
41 }
42
43 @Override
44 protected String getDocumentTypeName() {
45 return "CountryMaintenanceDocument";
46 }
47
48 @Override
49 protected String getInitiatorPrincipalName() {
50 return "admin";
51 }
52
53 @Override
54 protected Object getOldMaintainableObject() {
55 return getNewMaintainableObject();
56 }
57
58 @Test(expected = ValidationException.class)
59
60
61
62 public void test_RouteNewDoc() throws WorkflowException {
63 setupNewAccountMaintDoc(getDocument());
64 KRADServiceLocatorWeb.getDocumentService().routeDocument(getDocument(), "submit", null);
65 Assert.assertTrue(getDocument().getDocumentHeader().getWorkflowDocument().isEnroute());
66 }
67 }