summaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/update/ActionDatumTest.java
blob: 7b858ea65dbea6a228d79928eb9c08cde2d1a1be (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package org.onap.ccsdk.sli.adaptors.aai.update;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

public class ActionDatumTest {

	ActionDatum _oInstance;
	protected Map<String, Object> _additionalProperties;
	protected String _propertyName;
	protected String _propertyValue;
	
	@Before
	public void setUp() throws Exception {
		_oInstance = new ActionDatum();
		_propertyName = "propertyName";
		_propertyValue = "propertyValue";
		_additionalProperties = new HashMap<String, Object>() {{
			put("prop1", "propvalue1");
			put("prop2", "propvalue2");
		}};
	}

	@After
	public void tearDown() throws Exception {
		_oInstance = null;
		_additionalProperties = null;
	}

	@Test
	public void testSetPropertyName() {
		_oInstance.setPropertyName(_propertyName);
		assertEquals(_oInstance.getPropertyName(), _propertyName);
	}

	@Test
	public void testSetPropertyValue() {
		_oInstance.setPropertyValue(_propertyValue);
		assertEquals(_oInstance.getPropertyValue(), _propertyValue);
	}

	@Test
	public void testSetAdditionalProperty() {
		_oInstance.setAdditionalProperty("prop1", "propvalue1");
		_oInstance.setAdditionalProperty("prop2", "propvalue2");
		assertEquals(_oInstance.getAdditionalProperties(), _additionalProperties);
	}

}