File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -202,11 +202,14 @@ void preAnalyseNull() {
202202 doReturn (true ).when (goblintServer ).isAlive ();
203203 when (goblintConfWatcher .refreshGoblintConfig ()).thenReturn (true );
204204
205+ // Mock that Goblint returns some messages
206+ when (goblintService .messages ()).thenReturn (CompletableFuture .completedFuture (new ArrayList <>()));
207+
205208 // Mock that the command to execute is null
206209 when (gobPieConfiguration .getPreAnalyzeCommand ()).thenReturn (null );
207210
208211 // Mock that the analyses of Goblint have started and completed
209- when (goblintService .analyze (new AnalyzeParams (false ))).thenReturn (CompletableFuture .completedFuture (null ));
212+ when (goblintService .analyze (new AnalyzeParams (false ))).thenReturn (CompletableFuture .completedFuture (new GoblintAnalysisResult () ));
210213
211214 // Mock that the incremental analysis is turned off (TODO: not sure why this is checked in reanalyze?)
212215 when (gobPieConfiguration .useIncrementalAnalysis ()).thenReturn (true );
@@ -219,6 +222,7 @@ void preAnalyseNull() {
219222 // Verify that preAnalysis was indeed called once
220223 verify (goblintServer ).preAnalyse ();
221224 verify (magpieServer ).forwardMessageToClient (new MessageParams (MessageType .Info , "GobPie started analyzing the code." ));
225+ verify (magpieServer ).forwardMessageToClient (new MessageParams (MessageType .Info , "GobPie finished analyzing the code." ));
222226 }
223227
224228 @ Test
You can’t perform that action at this time.
0 commit comments