1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.bo;
17
18 import java.util.LinkedHashMap;
19
20 import org.junit.After;
21 import org.junit.Before;
22 import org.junit.Test;
23 import org.kuali.test.KNSTestCase;
24
25
26
27
28
29
30
31
32 public class BusinessObjectAttributeEntryTest extends KNSTestCase {
33
34 BusinessObjectAttributeEntry dummyBOAE;
35
36 @Before
37 public void setUp() throws Exception {
38 super.setUp();
39 dummyBOAE = new BusinessObjectAttributeEntry();
40 }
41
42
43
44
45
46
47 @After
48 public void tearDown() throws Exception {
49 super.tearDown();
50 dummyBOAE = null;
51 }
52
53 @Test
54 public void testAttributeControlType(){
55 dummyBOAE.setAttributeControlType("ControlType");
56 assertEquals("Testing AttributeControlType in BusiessObjectAtributeEntry","ControlType",dummyBOAE.getAttributeControlType());
57 }
58
59 @Test
60 public void testAttributeDescription(){
61 dummyBOAE.setAttributeDescription("attributeDescription");
62 assertEquals("Testing AttributeDescription in BusiessObjectAtributeEntry","attributeDescription",dummyBOAE.getAttributeDescription());
63 }
64
65 @Test
66 public void testAttributeFormatterClassName(){
67 dummyBOAE.setAttributeFormatterClassName("attributeFormatterClassName");
68 assertEquals("Testing AttributeFormatterClassName in BusiessObjectAtributeEntry", "attributeFormatterClassName",dummyBOAE.getAttributeFormatterClassName());
69 }
70
71 @Test
72 public void testAttributeLabel(){
73 dummyBOAE.setAttributeLabel("attributeLabel");
74 assertEquals("Testing AttributeLabel in BusiessObjectAtributeEntry","attributeLabel",dummyBOAE.getAttributeLabel());
75 }
76
77 @Test
78 public void testAttributeMaxLength(){
79 dummyBOAE.setAttributeMaxLength("100");
80 assertEquals("Testing AttributeMaxLength in BusiessObjectAtributeEntry","100",dummyBOAE.getAttributeMaxLength());
81 }
82
83 @Test
84 public void testAttributeName(){
85 dummyBOAE.setAttributeName("AttributeName");
86 assertEquals("Testing AttributeName in BusiessObjectAtributeEntry","AttributeName",dummyBOAE.getAttributeName());
87 }
88
89 @Test
90 public void testAttributeShortLabel(){
91 dummyBOAE.setAttributeShortLabel("AttributeShortLabel");
92 assertEquals("Testing AttributeShortLabel in BusiessObjectAtributeEntry","AttributeShortLabel",dummyBOAE.getAttributeShortLabel());
93 }
94
95 @Test
96 public void testAttributeSummary(){
97 dummyBOAE.setAttributeSummary("AttributeSummary");
98 assertEquals("Testing AttributeSummary in BusiessObjectAtributeEntry","AttributeSummary",dummyBOAE.getAttributeSummary());
99 }
100
101
102 @Test
103 public void testAttributeValidatingExpression(){
104 dummyBOAE.setAttributeValidatingExpression("AttributeValidatingExpression");
105 assertEquals("Testing AttributeValidatingExpression in BusiessObjectAtributeEntry","AttributeValidatingExpression",dummyBOAE.getAttributeValidatingExpression());
106 }
107
108 @Test
109 public void testDictionaryBusinessObjectName(){
110 dummyBOAE.setDictionaryBusinessObjectName("DictionaryBusinessObjectName");
111 assertEquals("Testing DictionaryBusinessObjectName in BusiessObjectAtributeEntry","DictionaryBusinessObjectName",dummyBOAE.getDictionaryBusinessObjectName());
112 }
113
114 @Test
115 public void testToStringMapper(){
116 dummyBOAE.setDictionaryBusinessObjectName("DictionaryBusinessObjectName");
117 dummyBOAE.setAttributeName("AttributeName");
118 LinkedHashMap dummyHashMap = dummyBOAE.toStringMapper();
119 assertEquals("Testing toStringMapper in BusiessObjectAtributeEntry","DictionaryBusinessObjectName",dummyHashMap.get("dictionaryBusinessObjectName"));
120 assertEquals("Testing toStringMapper in BusiessObjectAtributeEntry","AttributeName",dummyHashMap.get("attributeName"));
121 }
122
123 }