This repository was archived by the owner on Jun 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
src/test/java/fi/helsinki/cs/tmc/cli/command/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ public void worksWithOneCommands() {
147147 when (classElement .getKind ()).thenReturn (ElementKind .CLASS );
148148 Command annotation = CommandAnnotationExample1 .class .getAnnotation (Command .class );
149149 doReturn (annotation ).when (classElement ).getAnnotation (Command .class );
150- when ( roundEnv . getElementsAnnotatedWith ( any ( Class . class )) )
151- .thenReturn ( new HashSet <>( Arrays . asList ( classElement ) ));
150+ doReturn ( new HashSet <>( Arrays . asList ( classElement ))). when ( roundEnv )
151+ .getElementsAnnotatedWith ( any ( Class . class ));
152152
153153 Name mockedName = mock (Name .class );
154154 when (mockedName .toString ())
@@ -172,8 +172,8 @@ public void generateCorrectCodeWithTwoCommands() {
172172 annotation = CommandAnnotationExample2 .class .getAnnotation (Command .class );
173173 doReturn (annotation ).when (classElement2 ).getAnnotation (Command .class );
174174
175- when ( roundEnv . getElementsAnnotatedWith ( any ( Class . class )) )
176- .thenReturn ( new HashSet <>( Arrays . asList ( classElement1 , classElement2 ) ));
175+ doReturn ( new HashSet <>( Arrays . asList ( classElement1 , classElement2 ))). when ( roundEnv )
176+ .getElementsAnnotatedWith ( any ( Class . class ));
177177
178178 Name mockedName1 = mock (Name .class );
179179 when (mockedName1 .toString ())
You can’t perform that action at this time.
0 commit comments