1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.inquiry;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.junit.Test;
20 import org.kuali.rice.kns.KNSTestCase;
21 import org.kuali.rice.kns.inquiry.KualiInquirableImpl;
22 import org.kuali.rice.kns.lookup.HtmlData;
23 import org.kuali.rice.krad.test.document.bo.AccountManager;
24 import org.kuali.rice.krad.test.KRADTestCase;
25
26 import org.junit.Assert;
27
28
29
30
31
32
33 public class KualiInquirableTest extends KNSTestCase {
34
35 private AccountManager am;
36
37 @Override
38 public void setUp() throws Exception {
39 super.setUp();
40 am = new AccountManager();
41 am.setAmId(new Long(1));
42
43 }
44
45
46
47
48 @Test public final void testBuildInquiryUrl() {
49 String inquiryUrl = ((HtmlData.AnchorHtmlData)new KualiInquirableImpl().getInquiryUrl(am, "amId", true)).getHref();
50 Assert.assertTrue("An inquiry URL to AccountManager should be built. CI Failure - https://jira.kuali.org/browse/KULRICE-9286", StringUtils.contains(inquiryUrl,
51 "amId=1"));
52 Assert.assertTrue("An inquiry URL to AccountManager should be built", StringUtils.contains(inquiryUrl,
53 "businessObjectClassName=" + AccountManager.class.getName()));
54 }
55
56 }