Skip to content
Snippets Groups Projects
Commit 999735cd authored by Martin Vogel's avatar Martin Vogel
Browse files

refactor(#1073): adjust error message assertions

parent 6a54d9fa
No related branches found
No related tags found
1 merge request!206#1073 Fix Reply Channel Valdiation
......@@ -389,7 +389,7 @@ class SubscriberClientTest {
final FitConnectSubscriberException exception = assertThrows(FitConnectSubscriberException.class, () -> underTest.requestSubmission(submissionId));
// Then
assertThat(exception.getCause().getMessage(), containsString("Metadata is invalid"));
assertThat(exception.getCause().getMessage(), containsString("The authentication tag for the metadata is invalid"));
verify(subscriberMock, times(1)).rejectSubmission(EventPayload.forRejectEvent(submission, List.of(problem)));
}
......@@ -556,7 +556,7 @@ class SubscriberClientTest {
final FitConnectSubscriberException exception = assertThrows(FitConnectSubscriberException.class, () -> underTest.requestSubmission(submissionId));
// Then
assertThat(exception.getCause().getMessage(), containsString("Data is invalid"));
assertThat(exception.getCause().getMessage(), containsString("Submission data checksum wrong"));
verify(subscriberMock, times(1)).rejectSubmission(EventPayload.forRejectEvent(submission, List.of(problem)));
}
......@@ -613,7 +613,7 @@ class SubscriberClientTest {
final FitConnectSubscriberException exception = assertThrows(FitConnectSubscriberException.class, () -> underTest.requestSubmission(submissionId));
// Then
assertThat(exception.getCause().getMessage(), containsString("Data is invalid"));
assertThat(exception.getCause().getMessage(), containsString("Submission data does not comply to schema"));
verify(subscriberMock, times(1)).rejectSubmission(EventPayload.forRejectEvent(submission, List.of(problem)));
}
......@@ -682,7 +682,7 @@ class SubscriberClientTest {
final FitConnectSubscriberException exception = assertThrows(FitConnectSubscriberException.class, () -> underTest.requestSubmission(submissionId));
// Then
assertThat(exception.getCause().getMessage(), containsString("Attachment validation failed"));
assertThat(exception.getCause().getMessage(), containsString("The authentication tag for the attachment " + attachment.getAttachmentId() + " is invalid"));
verify(subscriberMock, times(1)).rejectSubmission(EventPayload.forRejectEvent(submission, List.of(problem)));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment