Skip to content

Commit 262d9ee

Browse files
committed
Add classname to tests
1 parent d27f18e commit 262d9ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/RuntimeExceptionCapture2Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void test() {
3535
}
3636

3737
private void fail(String methodName, int line, String exceptionName, Confidence confidence) {
38-
countBugs(methodName, exceptionName, 1);
38+
countBugs("REC2Test", methodName, exceptionName, 1);
3939
final BugInstanceMatcher bugInstanceMatcher = new BugInstanceMatcherBuilder()
4040
.bugType(exceptionName)
4141
.inClass("REC2Test")
@@ -47,13 +47,13 @@ private void fail(String methodName, int line, String exceptionName, Confidence
4747
}
4848

4949
private void pass(String className, String methodName, String exceptionName) {
50-
countBugs(methodName, exceptionName, 0);
50+
countBugs(className, methodName, exceptionName, 0);
5151
}
5252

53-
private void countBugs(String methodName, String exceptionName, int count) {
53+
private void countBugs(String className, String methodName, String exceptionName, int count) {
5454
BugInstanceMatcher bugTypeMatcher = new BugInstanceMatcherBuilder()
5555
.bugType(exceptionName)
56-
.inClass("REC2Test")
56+
.inClass(className)
5757
.inMethod(methodName)
5858
.build();
5959
assertThat(getBugCollection(), containsExactly(count, bugTypeMatcher));

0 commit comments

Comments
 (0)