001    /**
002     * Copyright 2005-2011 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.krad.bo;
017    
018    
019    import org.junit.After;
020    import org.junit.Before;
021    import org.junit.Test;
022    import org.kuali.rice.core.api.util.type.KualiDecimal;
023    import org.kuali.rice.core.api.util.type.KualiPercent;
024    
025    import java.sql.Date;
026    import java.sql.Timestamp;
027    
028    import static org.junit.Assert.assertEquals;
029    
030    /**
031     * This is a description of what this class does - chang don't forget to fill this in. 
032     * 
033     * @author Kuali Rice Team (rice.collab@kuali.org)
034     *
035     */
036    public class AttributeReferenceDummyTest {
037    
038            AttributeReferenceDummy dummyARD;
039            
040            @Before
041            public void setUp() throws Exception {
042                    dummyARD = new AttributeReferenceDummy();
043            }
044    
045            /**
046             * This method ...
047             * 
048             * @throws java.lang.Exception
049             */
050            @After
051            public void tearDown() throws Exception {
052                    dummyARD = null;
053            }
054            @Test
055            public void testCreateDate(){   
056                    Date currentDate = java.sql.Date.valueOf( "2010-08-24" );
057                    dummyARD.setCreateDate(currentDate);
058                    assertEquals("Testing CreateDate in AttributeReferenceDummy",currentDate,dummyARD.getCreateDate());
059            }
060            
061            @Test
062            public void testInitiatorNetworkId(){   
063                    String initiatorNetworkId = "InitiatorNetworkId";
064                    dummyARD.setInitiatorNetworkId(initiatorNetworkId);
065                    assertEquals("Testing InitiatorNetworkId in AttributeReferenceDummy",initiatorNetworkId,dummyARD.getInitiatorNetworkId());
066            }
067            
068            @Test
069            public void testPercent(){      
070                    KualiPercent dummyPercent = new KualiPercent(30);
071                    dummyARD.setPercent(dummyPercent);
072                    assertEquals("Testing Percent in AttributeReferenceDummy",dummyPercent,dummyARD.getPercent());
073            }
074            
075            @Test
076            public void testGenericSystemId(){      
077                    String genericSystemId = "GenericSystemId";
078                    dummyARD.setGenericSystemId(genericSystemId);
079                    assertEquals("Testing GenericSystemId in AttributeReferenceDummy",genericSystemId,dummyARD.getGenericSystemId());
080            }
081            
082            @Test
083            public void testOneDigitTextCode(){     
084                    String oneDigitTextCode = "OneDigitTextCode";
085                    dummyARD.setOneDigitTextCode(oneDigitTextCode);
086                    assertEquals("Testing OneDigitTextCode in AttributeReferenceDummy",oneDigitTextCode,dummyARD.getOneDigitTextCode());
087            }
088            
089            @Test
090            public void testGenericTimestamp(){     
091                    Timestamp genericTimestamp = Timestamp.valueOf("2008-08-24 13:01:10");
092                    dummyARD.setGenericTimestamp(genericTimestamp);
093                    assertEquals("Testing GenericTimestamp in AttributeReferenceDummy",genericTimestamp,dummyARD.getGenericTimestamp());
094            }
095            
096            @Test
097            public void testTwoDigitTextCode(){     
098                    String twoDigitTextCode = "TwoDigitTextCode";
099                    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    }