Skip to content

Commit

Permalink
Change parameter order in assertEquals (#30247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain1653 committed May 25, 2021
1 parent b989c4c commit 48e4f11
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ private static int testReceive(
return count + 1;
}
} else if (msg instanceof Integer) {
int value = ((Integer) msg).intValue();
assertEquals(value, 5);
int value = (Integer) msg;
assertEquals(5, value);
}
return count;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public void apiMustBeUsableFromJava() {
ActorSystemSetup.create().withSetup(javaSetting).get(JavaSetup.class);

assertTrue(result.isPresent());
assertEquals(result.get(), javaSetting);
assertEquals(javaSetting, result.get());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,26 @@ public void replicatedEventSourcingReplicationTest() {
replicaA.tell(new TestBehavior.GetState(probe.ref().narrow()));
TestBehavior.State reply = probe.expectMessageClass(TestBehavior.State.class);
assertEquals(
reply.texts,
new HashSet<String>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")));
new HashSet<>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")),
reply.texts);
return null;
});
probe.awaitAssert(
() -> {
replicaB.tell(new TestBehavior.GetState(probe.ref().narrow()));
TestBehavior.State reply = probe.expectMessageClass(TestBehavior.State.class);
assertEquals(
reply.texts,
new HashSet<String>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")));
new HashSet<>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")),
reply.texts);
return null;
});
probe.awaitAssert(
() -> {
replicaC.tell(new TestBehavior.GetState(probe.ref().narrow()));
TestBehavior.State reply = probe.expectMessageClass(TestBehavior.State.class);
assertEquals(
reply.texts,
new HashSet<String>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")));
new HashSet<>(Arrays.asList("stored-to-a", "stored-to-b", "stored-to-c")),
reply.texts);
return null;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void auctionExample() {
() -> {
replicaA.tell(new GetHighestBid(replyProbe.ref()));
Bid bid = replyProbe.expectMessageClass(Bid.class);
assertEquals(bid.offer, 202);
assertEquals(202, bid.offer);
return bid;
});

Expand Down

0 comments on commit 48e4f11

Please sign in to comment.