|
5 | 5 | import org.slf4j.Logger; |
6 | 6 | import org.slf4j.LoggerFactory; |
7 | 7 |
|
| 8 | +import java.nio.file.Files; |
| 9 | +import java.nio.file.Path; |
| 10 | +import java.nio.file.Paths; |
| 11 | + |
| 12 | +import static org.junit.Assert.assertTrue; |
| 13 | + |
8 | 14 | public class MphTableIT { |
9 | 15 | private static final Logger LOGGER = LoggerFactory.getLogger(MphTableIT.class); |
10 | 16 |
|
11 | 17 | @Test |
12 | | - public void testGitCase(){ |
| 18 | + public void testA(){ |
13 | 19 | String [] args = {"git", "-c", "mph-table"}; |
14 | 20 | JCallGraph.main(args); |
15 | 21 | } |
16 | 22 | @Test |
17 | | - public void testBuildCase(){ |
| 23 | + public void testB(){ |
18 | 24 | String [] args = {"build", "-j", "./artifacts/output/mph-table-1.0.6-SNAPSHOT.jar", |
19 | 25 | "-t", "./artifacts/output/mph-table-1.0.6-SNAPSHOT-tests.jar", "-o", "mph_table_graph"}; |
20 | 26 | JCallGraph.main(args); |
21 | 27 | } |
22 | 28 |
|
23 | 29 | @Test |
24 | | - public void testTestCase(){ |
| 30 | + public void testC(){ |
25 | 31 | String [] args = {"test", "-c", "mph-table", "-f", "mph_table_graph"}; |
26 | 32 | JCallGraph.main(args); |
27 | 33 | } |
| 34 | + |
| 35 | + @Test |
| 36 | + public void testFinalAssertions(){ |
| 37 | + |
| 38 | + // Git Stage |
| 39 | + Path mphJar = Paths.get("/artifacts/output/mph-table-1.0.6-SNAPSHOT.jar"); |
| 40 | + Path mphTestJar = Paths.get("/artifacts/output/mph-table-1.0.6-SNAPSHOT-tests.jar"); |
| 41 | + LOGGER.info("Starting Mph-Table Git Verification"); |
| 42 | + assertTrue(Files.exists(mphJar)); |
| 43 | + assertTrue(Files.exists(mphTestJar)); |
| 44 | + |
| 45 | + // Build Stage |
| 46 | + Path mphGraph = Paths.get("mph_table_graph"); |
| 47 | + LOGGER.info("Starting Mph-Table Build Verification"); |
| 48 | + assertTrue(Files.exists(mphGraph)); |
| 49 | + |
| 50 | + |
| 51 | + // Test Stage |
| 52 | + Path mphSmartByteSerializer = Paths.get("/output/TestSmartByteSerializer#canRoundTripBytes.dot"); |
| 53 | + Path mphSmartByteSerializerReachability = Paths.get("/output/TestSmartByteSerializer#canRoundTripBytes-reachability.dot"); |
| 54 | + Path mphSmartIntegerSerializer = Paths.get("/output/TestSmartIntegerSerializer#canRoundTripIntegers.dot"); |
| 55 | + Path mphSmartIntegerSerializerReachability = Paths.get("/output/TestSmartIntegerSerializer#canRoundTripIntegers-reachability.dot"); |
| 56 | + Path mphSmartListSerializer = Paths.get("/output/TestSmartListSerializer#canRoundTripSerializableLists.dot"); |
| 57 | + Path mphSmartListSerializerReachability = Paths.get("/output/TestSmartListSerializer#canRoundTripSerializableLists-reachability.dot"); |
| 58 | + Path mphSmartListSerializerWithGenerator = Paths.get("/output/TestSmartListSerializer#canRoundTripSerializableListsWithGenerator.dot"); |
| 59 | + Path mphSmartListSerializerWithGeneratorReachability = Paths.get("/output/TestSmartListSerializer#canRoundTripSerializableListsWithGenerator-reachability.dot"); |
| 60 | + Path mphSmartLongSerializer = Paths.get("/output/TestSmartLongSerializer#canRoundTripLongs.dot"); |
| 61 | + Path mphSmartLongSerializerReachability = Paths.get("/output/TestSmartLongSerializer#canRoundTripLongs-reachability.dot"); |
| 62 | + Path mphSmartPairSerializer = Paths.get("/output/TestSmartPairSerializer#canRoundTripPairs.dot"); |
| 63 | + Path mphSmartPairSerializerReachability = Paths.get("/output/TestSmartPairSerializer#canRoundTripPairs-reachability.dot"); |
| 64 | + Path mphSmartShortSerializer = Paths.get("/output/TestSmartShortSerializer#canRoundTripShort.dot"); |
| 65 | + Path mphSmartShortSerializerReachability = Paths.get("/output/TestSmartShortSerializer#canRoundTripShort-reachability.dot"); |
| 66 | + Path mphSmartStringSerializer = Paths.get("/output/TestSmartStringSerializer#canRoundTripStrings.dot"); |
| 67 | + Path mphSmartStringSerializerReachability = Paths.get("/output/TestSmartStringSerializer#canRoundTripStrings-reachability.dot"); |
| 68 | + assertTrue(Files.exists(mphSmartByteSerializer)); |
| 69 | + assertTrue(Files.exists(mphSmartByteSerializerReachability)); |
| 70 | + assertTrue(Files.exists(mphSmartIntegerSerializer)); |
| 71 | + assertTrue(Files.exists(mphSmartIntegerSerializerReachability)); |
| 72 | + assertTrue(Files.exists(mphSmartListSerializer)); |
| 73 | + assertTrue(Files.exists(mphSmartListSerializerReachability)); |
| 74 | + assertTrue(Files.exists(mphSmartListSerializerWithGenerator)); |
| 75 | + assertTrue(Files.exists(mphSmartListSerializerWithGeneratorReachability)); |
| 76 | + assertTrue(Files.exists(mphSmartLongSerializer)); |
| 77 | + assertTrue(Files.exists(mphSmartLongSerializerReachability)); |
| 78 | + assertTrue(Files.exists(mphSmartPairSerializer)); |
| 79 | + assertTrue(Files.exists(mphSmartPairSerializerReachability)); |
| 80 | + assertTrue(Files.exists(mphSmartShortSerializer)); |
| 81 | + assertTrue(Files.exists(mphSmartShortSerializerReachability)); |
| 82 | + assertTrue(Files.exists(mphSmartStringSerializer)); |
| 83 | + assertTrue(Files.exists(mphSmartStringSerializerReachability)); |
| 84 | + |
| 85 | + } |
28 | 86 | } |
0 commit comments