1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.bo;
17
18
19 import org.junit.After;
20 import org.junit.Before;
21 import org.junit.Test;
22 import org.kuali.rice.core.api.util.type.KualiDecimal;
23 import org.kuali.rice.core.api.util.type.KualiPercent;
24
25 import java.sql.Date;
26 import java.sql.Timestamp;
27
28 import static org.junit.Assert.assertEquals;
29
30
31
32
33
34
35
36 public class AttributeReferenceDummyTest {
37
38 AttributeReferenceDummy dummyARD;
39
40 @Before
41 public void setUp() throws Exception {
42 dummyARD = new AttributeReferenceDummy();
43 }
44
45
46
47
48
49
50 @After
51 public void tearDown() throws Exception {
52 dummyARD = null;
53 }
54 @Test
55 public void testCreateDate(){
56 Date currentDate = java.sql.Date.valueOf( "2010-08-24" );
57 dummyARD.setCreateDate(currentDate);
58 assertEquals("Testing CreateDate in AttributeReferenceDummy",currentDate,dummyARD.getCreateDate());
59 }
60
61 @Test
62 public void testInitiatorNetworkId(){
63 String initiatorNetworkId = "InitiatorNetworkId";
64 dummyARD.setInitiatorNetworkId(initiatorNetworkId);
65 assertEquals("Testing InitiatorNetworkId in AttributeReferenceDummy",initiatorNetworkId,dummyARD.getInitiatorNetworkId());
66 }
67
68 @Test
69 public void testPercent(){
70 KualiPercent dummyPercent = new KualiPercent(30);
71 dummyARD.setPercent(dummyPercent);
72 assertEquals("Testing Percent in AttributeReferenceDummy",dummyPercent,dummyARD.getPercent());
73 }
74
75 @Test
76 public void testGenericSystemId(){
77 String genericSystemId = "GenericSystemId";
78 dummyARD.setGenericSystemId(genericSystemId);
79 assertEquals("Testing GenericSystemId in AttributeReferenceDummy",genericSystemId,dummyARD.getGenericSystemId());
80 }
81
82 @Test
83 public void testOneDigitTextCode(){
84 String oneDigitTextCode = "OneDigitTextCode";
85 dummyARD.setOneDigitTextCode(oneDigitTextCode);
86 assertEquals("Testing OneDigitTextCode in AttributeReferenceDummy",oneDigitTextCode,dummyARD.getOneDigitTextCode());
87 }
88
89 @Test
90 public void testGenericTimestamp(){
91 Timestamp genericTimestamp = Timestamp.valueOf("2008-08-24 13:01:10");
92 dummyARD.setGenericTimestamp(genericTimestamp);
93 assertEquals("Testing GenericTimestamp in AttributeReferenceDummy",genericTimestamp,dummyARD.getGenericTimestamp());
94 }
95
96 @Test
97 public void testTwoDigitTextCode(){
98 String twoDigitTextCode = "TwoDigitTextCode";
99 dummyARD.setTwoDigitTextCode(twoDigitTextCode);
100 assertEquals("Testing twoDigitTextCode in AttributeReferenceDummy",twoDigitTextCode,dummyARD.getTwoDigitTextCode());
101 }
102
103 @Test
104 public void testGenericDate(){
105 Date genericDate = java.sql.Date.valueOf( "2010-08-24" );
106 dummyARD.setGenericDate(genericDate);
107 assertEquals("Testing GenericDate in AttributeReferenceDummy",genericDate,dummyARD.getGenericDate());
108 }
109
110 @Test
111 public void testGenericBoolean(){
112 Boolean genericBoolean = true;
113 dummyARD.setGenericBoolean(genericBoolean);
114 assertEquals("Testing GenericBoolean in AttributeReferenceDummy",genericBoolean,dummyARD.isGenericBoolean());
115 }
116
117 @Test
118 public void testActiveIndicator(){
119 Boolean activeIndicator = true;
120 dummyARD.setActiveIndicator(activeIndicator);
121 assertEquals("Testing ActiveIndicator in AttributeReferenceDummy",activeIndicator,dummyARD.isActiveIndicator());
122 }
123
124 @Test
125 public void testGenericAmount(){
126 KualiDecimal genericAmount = new KualiDecimal(10.12);
127 dummyARD.setGenericAmount(genericAmount);
128 assertEquals("Testing GenericAmount in AttributeReferenceDummy",genericAmount,dummyARD.getGenericAmount());
129 }
130
131 @Test
132 public void testGenericBigText(){
133 String genericBigText = "GenericBigText";
134 dummyARD.setGenericBigText(genericBigText);
135 assertEquals("Testing GenericBigText in AttributeReferenceDummy",genericBigText,dummyARD.getGenericBigText());
136 }
137
138 @Test
139 public void testEmailAddress(){
140 String emailAddress = "EmailAddress";
141 dummyARD.setEmailAddress(emailAddress);
142 assertEquals("Testing EmailAddress in AttributeReferenceDummy",emailAddress,dummyARD.getEmailAddress());
143 }
144
145 @Test
146 public void testNewCollectionRecord(){
147 Boolean newCollectionRecord = true;
148 dummyARD.setNewCollectionRecord(newCollectionRecord);
149 assertEquals("Testing NewCollectionRecord in AttributeReferenceDummy",newCollectionRecord,dummyARD.isNewCollectionRecord());
150 }
151
152 @Test
153 public void testWorkflowDocumentStatus(){
154 String workflowDocumentStatus = "WorkflowDocumentStatus";
155 dummyARD.setWorkflowDocumentStatus(workflowDocumentStatus);
156 assertEquals("Testing WorkflowDocumentStatus in AttributeReferenceDummy",workflowDocumentStatus,dummyARD.getWorkflowDocumentStatus());
157 }
158 }