Raise JUnit coverage asdctool
[sdc.git] / asdctool / src / test / java / org / openecomp / sdc / asdctool / impl / GraphJsonValidatorTest.java
1 package org.openecomp.sdc.asdctool.impl;
2
3 import java.nio.file.NoSuchFileException;
4
5 import org.junit.Test;
6
7 public class GraphJsonValidatorTest {
8
9         private GraphJsonValidator createTestSubject() {
10                 return new GraphJsonValidator();
11         }
12
13         @Test
14         public void testVerifyTitanJson() throws Exception {
15                 GraphJsonValidator testSubject;
16                 boolean result;
17
18                 // default test
19                 testSubject = createTestSubject();
20                 result = testSubject.verifyTitanJson("src/test/resources/graph.json");
21         }
22         
23         @Test
24         public void testVerifyTitanJsonErrorFile() throws Exception {
25                 GraphJsonValidator testSubject;
26                 boolean result;
27
28                 // default test
29                 testSubject = createTestSubject();
30                 result = testSubject.verifyTitanJson("src/test/resources/graphError.json");
31         }
32         
33         @Test(expected=NoSuchFileException.class)
34         public void testVerifyTitanJsonNoFile() throws Exception {
35                 GraphJsonValidator testSubject;
36                 boolean result;
37
38                 // default test
39                 testSubject = createTestSubject();
40                 result = testSubject.verifyTitanJson("stam");
41         }
42 }