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  
23  import static org.junit.Assert.assertEquals;
24  
25  
26  
27  
28  
29  
30  
31  public class PersistableAttachmentBaseTest {
32  
33  	PersistableAttachmentBase persistableAttachmentBase;
34  	
35  	@Before
36  	public void setUp() throws Exception {
37  		persistableAttachmentBase = new PersistableAttachmentBase();
38  	}
39  
40  	@After
41  	public void tearDown() throws Exception {
42  	    persistableAttachmentBase = null;
43  	}
44  	
45  	@Test
46      
47  
48  
49  	public void testAttachmentContent(){
50  		byte[] dummyByte = "dummy string".getBytes(); 
51  		persistableAttachmentBase.setAttachmentContent(dummyByte);
52  		assertEquals("Testing AttachmentContent in PersistableAttachmentBase.",dummyByte,persistableAttachmentBase.getAttachmentContent());
53  	}
54  	
55  	@Test
56      
57  
58  
59  	public void testFileName(){
60  		persistableAttachmentBase.setFileName("FileName");
61  		assertEquals("Testing FileName in PersistableAttachmentBase.","FileName",persistableAttachmentBase.getFileName());
62  	}
63  	
64  	@Test
65      
66  
67  
68  	public void testContentType(){
69  		persistableAttachmentBase.setContentType("contentType");
70  		assertEquals("Testing FileName in PersistableAttachmentBase.","contentType",persistableAttachmentBase.getContentType());
71  	}
72  }