-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- B FirstWorkingReporter does not swallow reporters with approval power
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
approvaltests-tests/src/test/java/org/approvaltests/reporters/FirstWorkingReporterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.approvaltests.reporters; | ||
|
||
import org.approvaltests.Approvals; | ||
import org.approvaltests.core.Options; | ||
import org.approvaltests.core.VerifyResult; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class FirstWorkingReporterTest { | ||
|
||
@Test | ||
void testReporterWithApprovalPower() { | ||
var t = new ReporterWithApprovalPower() { | ||
|
||
@Override | ||
public boolean report(String received, String approved) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public VerifyResult approveWhenReported() { | ||
return VerifyResult.SUCCESS; | ||
} | ||
}; | ||
Approvals.verify("test", new Options(new FirstWorkingReporter(t))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters