blob: 87d95ed9974beb91c6c2ca3825bb828676b91a7a (
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
|
package org.openecomp.sdc.asdctool.impl;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import java.nio.file.NoSuchFileException;
public class GraphJsonValidatorTest {
private GraphJsonValidator createTestSubject() {
return new GraphJsonValidator();
}
@Test
public void testVerifyJanusGraphJson() throws Exception {
GraphJsonValidator testSubject;
boolean result;
// default test
testSubject = createTestSubject();
result = testSubject.verifyJanusGraphJson("src/test/resources/graph.json");
assertTrue(result);
}
@Test
public void testVerifyJanusGraphJsonErrorFile() throws Exception {
GraphJsonValidator testSubject;
boolean result;
// default test
testSubject = createTestSubject();
result = testSubject.verifyJanusGraphJson("src/test/resources/graphError.json");
assertFalse(result);
}
@Test(expected=NoSuchFileException.class)
public void testVerifyJanusGraphJsonNoFile() throws Exception {
GraphJsonValidator testSubject;
// default test
testSubject = createTestSubject();
testSubject.verifyJanusGraphJson("stam");
}
}
|