@@ -51,6 +51,7 @@ public class CodeAnalyzerIntegrationTest {
51
51
.withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("build/libs" )), "/opt/jars" )
52
52
.withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/mvnw-corrupt-test" )), "/test-applications/mvnw-corrupt-test" )
53
53
.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" )
54
55
.withCopyFileToContainer (MountableFile .forHostPath (Paths .get (System .getProperty ("user.dir" )).resolve ("src/test/resources/test-applications/mvnw-working-test" )), "/test-applications/mvnw-working-test" );
55
56
56
57
@ Container
@@ -104,6 +105,23 @@ void shouldBeAbleToRunCodeAnalyzer() throws Exception {
104
105
"Should have some output" );
105
106
}
106
107
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
+ }
107
125
@ Test
108
126
void corruptMavenShouldNotBuildWithWrapper () throws IOException , InterruptedException {
109
127
// Make executable
0 commit comments