aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactValidationUtilsTest.java
blob: 27deb6bce875a6fec240aff10c1030ea4a841502 (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
package org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts;

import java.util.List;
import java.util.Map;

import org.junit.Test;
import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;

public class ArtifactValidationUtilsTest {

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

	@Test(expected=NullPointerException.class)
	public void testValidateArtifactsAreInCassandra() throws Exception {
		ArtifactValidationUtils testSubject;
		GraphVertex vertex = null;
		String taskName = "";
		List<ArtifactDataDefinition> artifacts = null;
		ArtifactsVertexResult result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.validateArtifactsAreInCassandra(vertex, taskName, artifacts);
	}

	@Test(expected=NullPointerException.class)
	public void testIsArtifcatInCassandra() throws Exception {
		ArtifactValidationUtils testSubject;
		String uniueId = "";
		boolean result;

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

	@Test
	public void testAddRelevantArtifacts() throws Exception {
		ArtifactValidationUtils testSubject;
		Map<String, ArtifactDataDefinition> artifactsMap = null;
		List<ArtifactDataDefinition> result;

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

	@Test(expected=NullPointerException.class)
	public void testValidateTopologyTemplateArtifacts() throws Exception {
		ArtifactValidationUtils testSubject;
		GraphVertex vertex = null;
		String taskName = "";
		ArtifactsVertexResult result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.validateTopologyTemplateArtifacts(vertex, taskName);
	}
}