File tree 2 files changed +8
-0
lines changed
src/main/java/com/mebigfatguy/fbcontrib/detect
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ private enum TestFrameworkType {
87
87
private static final String MBEAN_CLASS = "org/meanbean/test/BeanTester" ;
88
88
private static final String MBEAN_METHOD = "testBean" ;
89
89
90
+ private static final String RESULTSACTION_CLASS = "org/springframework/test/web/servlet/ResultActions" ;
91
+
90
92
private BugReporter bugReporter ;
91
93
private JavaClass testCaseClass ;
92
94
private JavaClass testAnnotationClass ;
@@ -338,6 +340,11 @@ public void sawOpcode(int seen) {
338
340
if (MBEAN_METHOD .equals (methodName )) {
339
341
sawAssert = true ;
340
342
}
343
+ } else if (RESULTSACTION_CLASS .equals (className )) {
344
+ String methodName = getMethodName ();
345
+ if ("andExpect" .equals (methodName ) || "andExpectAll" .equals (methodName )) {
346
+ sawAssert = true ;
347
+ }
341
348
}
342
349
} else if ((seen == Const .ATHROW ) && (stack .getStackDepth () > 0 )) {
343
350
OpcodeStack .Item item = stack .getStackItem (0 );
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ public class WriteOnlyCollection extends MissingMethodsDetector {
130
130
nim .add ("addLast" );
131
131
nim .add ("clear" );
132
132
nim .add ("ensureCapacity" );
133
+ nim .add ("forEach" );
133
134
nim .add ("insertElementAt" );
134
135
nim .add ("push" );
135
136
nim .add ("put" );
You can’t perform that action at this time.
0 commit comments