Skip to content

Commit 624f90f

Browse files
committed
a reformat code
1 parent 8c0ab21 commit 624f90f

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

approvaltests-tests/src/test/java/org/approvaltests/reporters/FirstWorkingReporterTest.java

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
import org.approvaltests.core.VerifyResult;
66
import org.junit.jupiter.api.Test;
77

8-
class FirstWorkingReporterTest {
9-
10-
@Test
11-
void testReporterWithApprovalPower() {
12-
var t = new ReporterWithApprovalPower() {
13-
14-
@Override
15-
public boolean report(String received, String approved) {
16-
return true;
17-
}
18-
19-
@Override
20-
public VerifyResult approveWhenReported() {
21-
return VerifyResult.SUCCESS;
22-
}
23-
};
24-
Approvals.verify("test", new Options(new FirstWorkingReporter(t)));
25-
}
8+
class FirstWorkingReporterTest
9+
{
10+
@Test
11+
void testReporterWithApprovalPower()
12+
{
13+
var t = new ReporterWithApprovalPower()
14+
{
15+
@Override
16+
public boolean report(String received, String approved)
17+
{
18+
return true;
19+
}
20+
@Override
21+
public VerifyResult approveWhenReported()
22+
{
23+
return VerifyResult.SUCCESS;
24+
}
25+
};
26+
Approvals.verify("test", new Options(new FirstWorkingReporter(t)));
27+
}
2628
}

approvaltests/src/main/java/org/approvaltests/reporters/FirstWorkingReporter.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
public class FirstWorkingReporter implements ReporterWithApprovalPower
77
{
88
private final ApprovalFailureReporter[] reporters;
9-
private VerifyResult approvalOutcome = VerifyResult.FAILURE;
10-
9+
private VerifyResult approvalOutcome = VerifyResult.FAILURE;
1110
public FirstWorkingReporter(ApprovalFailureReporter... reporters)
1211
{
1312
this.reporters = reporters;
@@ -29,13 +28,13 @@ public boolean report(String received, String approved)
2928
}
3029
return false;
3130
}
32-
33-
private void checkApprovalPower(ApprovalFailureReporter reporter) {
34-
if (reporter instanceof ReporterWithApprovalPower) {
31+
private void checkApprovalPower(ApprovalFailureReporter reporter)
32+
{
33+
if (reporter instanceof ReporterWithApprovalPower)
34+
{
3535
approvalOutcome = ((ReporterWithApprovalPower) reporter).approveWhenReported();
3636
}
3737
}
38-
3938
public ApprovalFailureReporter[] getReporters()
4039
{
4140
return reporters;
@@ -45,9 +44,9 @@ public String toString()
4544
{
4645
return getClass().getName();
4746
}
48-
4947
@Override
50-
public VerifyResult approveWhenReported() {
48+
public VerifyResult approveWhenReported()
49+
{
5150
return approvalOutcome;
5251
}
5352
}

0 commit comments

Comments
 (0)