Raise JUnit coverage asdctool
[sdc.git] / asdctool / src / test / java / org / openecomp / sdc / asdctool / impl / validator / tasks / artifacts / ArtifactValidationUtilsTest.java
1 package org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.junit.Test;
7 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
8 import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
9
10 public class ArtifactValidationUtilsTest {
11
12         private ArtifactValidationUtils createTestSubject() {
13                 return new ArtifactValidationUtils();
14         }
15
16         @Test(expected=NullPointerException.class)
17         public void testValidateArtifactsAreInCassandra() throws Exception {
18                 ArtifactValidationUtils testSubject;
19                 GraphVertex vertex = null;
20                 String taskName = "";
21                 List<ArtifactDataDefinition> artifacts = null;
22                 ArtifactsVertexResult result;
23
24                 // default test
25                 testSubject = createTestSubject();
26                 result = testSubject.validateArtifactsAreInCassandra(vertex, taskName, artifacts);
27         }
28
29         @Test(expected=NullPointerException.class)
30         public void testIsArtifcatInCassandra() throws Exception {
31                 ArtifactValidationUtils testSubject;
32                 String uniueId = "";
33                 boolean result;
34
35                 // default test
36                 testSubject = createTestSubject();
37                 result = testSubject.isArtifcatInCassandra(uniueId);
38         }
39
40         @Test
41         public void testAddRelevantArtifacts() throws Exception {
42                 ArtifactValidationUtils testSubject;
43                 Map<String, ArtifactDataDefinition> artifactsMap = null;
44                 List<ArtifactDataDefinition> result;
45
46                 // default test
47                 testSubject = createTestSubject();
48                 result = testSubject.addRelevantArtifacts(artifactsMap);
49         }
50
51         @Test(expected=NullPointerException.class)
52         public void testValidateTopologyTemplateArtifacts() throws Exception {
53                 ArtifactValidationUtils testSubject;
54                 GraphVertex vertex = null;
55                 String taskName = "";
56                 ArtifactsVertexResult result;
57
58                 // default test
59                 testSubject = createTestSubject();
60                 result = testSubject.validateTopologyTemplateArtifacts(vertex, taskName);
61         }
62 }