Change parameter order in assertEquals (#30247)

This commit is contained in:
Andrei Arlou 2021-05-25 18:46:07 +03:00 committed by GitHub
parent b989c4cf3e
commit 48e4f11dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

@ -25,8 +25,8 @@ public class StashJavaAPITestActors {
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;
}

View file

@ -28,6 +28,6 @@ public class ActorSystemSetupTest extends JUnitSuite {
ActorSystemSetup.create().withSetup(javaSetting).get(JavaSetup.class);
assertTrue(result.isPresent());
assertEquals(result.get(), javaSetting);
assertEquals(javaSetting, result.get());
}
}

View file

@ -180,8 +180,8 @@ public class ReplicatedEventSourcingTest extends JUnitSuite {
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(
@ -189,8 +189,8 @@ public class ReplicatedEventSourcingTest extends JUnitSuite {
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(
@ -198,8 +198,8 @@ public class ReplicatedEventSourcingTest extends JUnitSuite {
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;
});
}

View file

@ -70,7 +70,7 @@ public class ReplicatedAuctionExampleTest extends JUnitSuite {
() -> {
replicaA.tell(new GetHighestBid(replyProbe.ref()));
Bid bid = replyProbe.expectMessageClass(Bid.class);
assertEquals(bid.offer, 202);
assertEquals(202, bid.offer);
return bid;
});