Skip to content

Commit

Permalink
NotificationsTest: test fixes, second (and final) attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Aug 25, 2022
1 parent e0da7fd commit 27f4fef
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public void test150NotifierWithLocalizedMessageTemplate() throws Exception {
then("transport sends the message with template content for 'sk' language");
message = getSingleMessage(testTransport);
assertThat(message.getTo()).containsExactlyInAnyOrder("user2@example.com");
assertThat(message.getBody()).isEqualTo("template-body-sk");
assertThat(message.getBody()).startsWith("template-body-sk"); // there can be subscription footer

// now when-then for other language
when("event is sent to notification manager, recipient has other language set");
Expand All @@ -405,7 +405,7 @@ public void test150NotifierWithLocalizedMessageTemplate() throws Exception {
then("transport sends the message with default template content, because no localized content for specified language is found");
message = getSingleMessage(testTransport);
assertThat(message.getTo()).containsExactlyInAnyOrder("user3@example.com");
assertThat(message.getBody()).isEqualTo("template-body-default");
assertThat(message.getBody()).startsWith("template-body-default");
}

@Test
Expand Down Expand Up @@ -608,7 +608,7 @@ public void test300MessageTransportUsingRecipientAddressExpression() throws Exce
assertThat(message).isNotNull();
and("address is based on notifier/recipientExpression -> transport/recipientAddressExpression chain");
assertThat(message.getTo()).containsExactlyInAnyOrder("xxxuser@example.com");
assertThat(message.getBody()).isEqualTo(messageBody); // there can be subscription footer
assertThat(message.getBody()).startsWith(messageBody); // there can be subscription footer
}

@Test
Expand Down

0 comments on commit 27f4fef

Please sign in to comment.