summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/config/oxm/OxmEntityDescriptorTest.java
blob: dea5d7972067f1e9b767ba3af353ae20b72a89ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.onap.aai.sparky.config.oxm;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import java.util.ArrayList;

import org.junit.Before;
import org.junit.Test;

public class OxmEntityDescriptorTest {
	
	private OxmEntityDescriptor oxmEntityDescriptor; 
	private ArrayList<String> primaryKeyAttributeNames; 
	 
	@Before
	  public void init() throws Exception {
		oxmEntityDescriptor = new OxmEntityDescriptor();
		primaryKeyAttributeNames = new ArrayList<String>(); 
	      
	  }
	
	@Test 
	public void updateValues() {
	
		oxmEntityDescriptor.setEntityName("");
		assertNotNull(oxmEntityDescriptor.getEntityName());
		oxmEntityDescriptor.setPrimaryKeyAttributeNames(primaryKeyAttributeNames);
		assertNotNull(oxmEntityDescriptor.getPrimaryKeyAttributeNames());
		oxmEntityDescriptor.addPrimaryKeyName("");
		assertNotNull(oxmEntityDescriptor.toString());
		oxmEntityDescriptor.setEntityName(null);
		assertNull(oxmEntityDescriptor.getEntityName());
		oxmEntityDescriptor.setPrimaryKeyAttributeNames(null);
		assertNull(oxmEntityDescriptor.getPrimaryKeyAttributeNames());
		assertNotNull(oxmEntityDescriptor.toString());
		
		
	}

}