1 package org.openecomp.sdc.asdctool.impl.validator.executers;
3 import java.util.HashMap;
4 import java.util.LinkedList;
9 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
10 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
11 import org.openecomp.sdc.be.model.Component;
12 import org.openecomp.sdc.be.model.Resource;
14 public class ArtifactValidatorExecuterTest {
16 private ArtifactValidatorExecuter createTestSubject() {
17 return new ArtifactValidatorExecuter();
21 public void testGetName() throws Exception {
22 ArtifactValidatorExecuter testSubject;
26 testSubject = createTestSubject();
27 result = testSubject.getName();
30 @Test(expected=NullPointerException.class)
31 public void testGetVerticesToValidate() throws Exception {
32 ArtifactValidatorExecuter testSubject;
33 VertexTypeEnum type = null;
34 Map<GraphPropertyEnum, Object> hasProps = null;
37 testSubject = createTestSubject();
38 testSubject.getVerticesToValidate(type, hasProps);
42 public void testSetName() throws Exception {
43 ArtifactValidatorExecuter testSubject;
47 testSubject = createTestSubject();
48 testSubject.setName(name);
51 @Test(expected=NullPointerException.class)
52 public void testValidate() throws Exception {
53 ArtifactValidatorExecuter testSubject;
54 Map<String, List<Component>> vertices = new HashMap<>();
55 LinkedList<Component> linkedList = new LinkedList<Component>();
56 linkedList.add(new Resource());
57 vertices.put("stam", linkedList);
61 testSubject = createTestSubject();
62 result = testSubject.validate(vertices);