Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct assert expected and actual order #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions exercises/src/test/java/c4_LifecycleHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void no_subscription_no_gains() {
.expectNextCount(5)
.verifyComplete();

Assertions.assertEquals(hooksTriggered, List.of("subscribe"));
Assertions.assertEquals(List.of("subscribe"), hooksTriggered);
}

/**
Expand All @@ -63,7 +63,7 @@ public void be_there_early() {
.expectNextCount(5)
.verifyComplete();

Assertions.assertEquals(hooksTriggered, Arrays.asList("before subscribe", "subscribe"));
Assertions.assertEquals(Arrays.asList("before subscribe", "subscribe"), hooksTriggered);
}

/**
Expand All @@ -82,7 +82,7 @@ public void atomic_counter() {
.expectNextCount(20)
.verifyComplete();

Assertions.assertEquals(counter.get(), 20);
Assertions.assertEquals(20, counter.get());
}

/**
Expand Down Expand Up @@ -148,7 +148,7 @@ public void terminator() {
.expectError()
.verify();

Assertions.assertEquals(hooksTriggeredCounter.get(), 2);
Assertions.assertEquals(2, hooksTriggeredCounter.get());
}

/**
Expand Down Expand Up @@ -177,7 +177,7 @@ public void one_to_catch_them_all() {
.expectError()
.verify();

Assertions.assertEquals(hooksTriggeredCounter.get(), 3);
Assertions.assertEquals(3, hooksTriggeredCounter.get());
}

/**
Expand All @@ -199,7 +199,7 @@ public void ordering_is_important() {
.expectNext(true)
.verifyComplete();

Assertions.assertEquals(sideEffects, orderOfExecution);
Assertions.assertEquals(orderOfExecution, sideEffects);
}

/**
Expand All @@ -224,6 +224,6 @@ public void one_to_rule_them_all() {
.expectNextCount(3)
.verifyComplete();

Assertions.assertEquals(signals, Arrays.asList("ON_NEXT", "ON_NEXT", "ON_NEXT", "ON_COMPLETE"));
Assertions.assertEquals(Arrays.asList("ON_NEXT", "ON_NEXT", "ON_NEXT", "ON_COMPLETE"), signals);
}
}