aboutsummaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/update/UpdateNodeKeyTest.java
blob: 360a0948f44284a0eed8d8b10011f302f7386129 (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
package org.onap.ccsdk.sli.adaptors.aai.update;

import static org.junit.Assert.*;

import java.util.HashMap;
import java.util.Map;

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

public class UpdateNodeKeyTest {
	UpdateNodeKey _oInstance;
	protected Map<String, Object> _additionalProperties;
	protected String _keyName;
	protected String _keyValue;
	@Before
	public void setUp() throws Exception {
		_oInstance = new UpdateNodeKey();
		_keyName = "keyName";
		_keyValue = "keyValue";
		_additionalProperties = new HashMap<String, Object>() {{
			put("prop1", "propvalue1");
			put("prop2", "propvalue2");
		}};
	}

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

	@Test
	public void testSetKeyName() {
		_oInstance.setKeyName(_keyName);
		assertEquals(_oInstance.getKeyName(), _keyName);
	}

	@Test
	public void testSetKeyValue() {
		_oInstance.setKeyName(_keyName);
		assertEquals(_oInstance.getKeyName(), _keyName);
	}

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

}