View Javadoc

1   /*
2    * Copyright 2007-2010 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * This is a description of what this class does - chang don't forget to fill this in. 
28   * 
29   * @author Kuali Rice Team (rice.collab@kuali.org)
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  	 * This method ...
44  	 * 
45  	 * @throws java.lang.Exception
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 }