Increasing test coverage
[aai/sparky-be.git] / src / test / java / org / onap / aai / sparky / config / oxm / OxmEntityDescriptorTest.java
1 package org.onap.aai.sparky.config.oxm;
2
3 import static org.junit.Assert.assertNotNull;
4 import static org.junit.Assert.assertNull;
5
6 import java.util.ArrayList;
7
8 import org.junit.Before;
9 import org.junit.Test;
10
11 public class OxmEntityDescriptorTest {
12         
13         private OxmEntityDescriptor oxmEntityDescriptor; 
14         private ArrayList<String> primaryKeyAttributeNames; 
15          
16         @Before
17           public void init() throws Exception {
18                 oxmEntityDescriptor = new OxmEntityDescriptor();
19                 primaryKeyAttributeNames = new ArrayList<String>(); 
20               
21           }
22         
23         @Test 
24         public void updateValues() {
25         
26                 oxmEntityDescriptor.setEntityName("");
27                 assertNotNull(oxmEntityDescriptor.getEntityName());
28                 oxmEntityDescriptor.setPrimaryKeyAttributeNames(primaryKeyAttributeNames);
29                 assertNotNull(oxmEntityDescriptor.getPrimaryKeyAttributeNames());
30                 oxmEntityDescriptor.addPrimaryKeyName("");
31                 assertNotNull(oxmEntityDescriptor.toString());
32                 oxmEntityDescriptor.setEntityName(null);
33                 assertNull(oxmEntityDescriptor.getEntityName());
34                 oxmEntityDescriptor.setPrimaryKeyAttributeNames(null);
35                 assertNull(oxmEntityDescriptor.getPrimaryKeyAttributeNames());
36                 assertNotNull(oxmEntityDescriptor.toString());
37                 
38                 
39         }
40
41 }