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