summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/NameIdPairWrapperTest.java
blob: 4f6e7cace405258b69556f2b7868658157487958 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package org.openecomp.sdc.be.datamodel;

import org.junit.Test;

public class NameIdPairWrapperTest {

	private NameIdPairWrapper createTestSubject() {
		return new NameIdPairWrapper();
	}

	@Test
	public void testInit() throws Exception {
		NameIdPairWrapper testSubject;
		NameIdPair nameIdPair = new NameIdPair("mock", "mock");

		// default test
		testSubject = createTestSubject();
		
		testSubject.init(nameIdPair);
	}

	@Test
	public void testInitWithObject() throws Exception {
		NameIdPairWrapper testSubject;
		NameIdPair nameIdPair = new NameIdPair("mock", "mock");

		// default test
		testSubject = new NameIdPairWrapper(nameIdPair);
	}

	@Test
	public void testGetId() throws Exception {
		NameIdPairWrapper testSubject;
		String result;

		// default test
		testSubject = createTestSubject();
		testSubject.setId("mock");
		result = testSubject.getId();
	}

	@Test
	public void testSetId() throws Exception {
		NameIdPairWrapper testSubject;
		String id = "";

		// default test
		testSubject = createTestSubject();
		testSubject.setId(id);
	}

	@Test
	public void testGetData() throws Exception {
		NameIdPairWrapper testSubject;
		NameIdPair result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.getData();
	}

	@Test
	public void testSetData() throws Exception {
		NameIdPairWrapper testSubject;
		NameIdPair data = null;

		// default test
		testSubject = createTestSubject();
		testSubject.setData(data);
	}
	
	@Test
	public void testGetNameIdPair() throws Exception {
		NameIdPairWrapper testSubject;
		NameIdPair nameIdPair = new NameIdPair("mock", "mock");
		
		// default test
		testSubject = createTestSubject();
		testSubject.init(nameIdPair);
		testSubject.getNameIdPair();
	}
}