@@ -51,6 +51,7 @@ public class CodeAnalyzerIntegrationTest {
5151 .withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("build/libs" )), "/opt/jars" )
5252 .withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/mvnw-corrupt-test" )), "/test-applications/mvnw-corrupt-test" )
5353 .withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/plantsbywebsphere" )), "/test-applications/plantsbywebsphere" )
54+ .withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/call-graph-test" )), "/test-applications/call-graph-test" )
5455 .withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/mvnw-working-test" )), "/test-applications/mvnw-working-test" );
5556
5657 @ Container
@@ -104,6 +105,23 @@ void shouldBeAbleToRunCodeAnalyzer() throws Exception {
104105 "Should have some output" );
105106 }
106107
108+ @ Test
109+ void callGraphShouldHaveKnownEdges () throws Exception {
110+ var runCodeAnalyzerOnCallGraphTest = container .withWorkingDirectory ("/test-applications/call-graph-test" )
111+ .execInContainer (
112+ "java" ,
113+ "-jar" ,
114+ String .format ("/opt/jars/codeanalyzer-%s.jar" , codeanalyzerVersion ),
115+ "--input=/test-applications/call-graph-test" ,
116+ "--analysis-level=2" ,
117+ "--verbose"
118+ );
119+
120+ String output = runCodeAnalyzerOnCallGraphTest .getStdout ();
121+
122+ // Normalize the output to ignore formatting differences
123+ String normalizedOutput = output .replaceAll ("\\ s+" , "" );
124+ }
107125 @ Test
108126 void corruptMavenShouldNotBuildWithWrapper () throws IOException , InterruptedException {
109127 // Make executable
0 commit comments