Skip to content
Snippets Groups Projects
Commit b42ee656 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6754 KOP-2703 Cleanup XdomeaXtaMessageCreatorTest

parent c2c170f3
No related branches found
No related tags found
No related merge requests found
......@@ -260,22 +260,22 @@ class XdomeaXtaMessageCreatorTest {
private static final String MESSAGE_TYPE_CODE = "messageTypeCode";
private static final String VALID_ZIP_FILE_NAME = "processId_messageTypeCode.zip";
@DisplayName("should not throw exception")
@DisplayName("should not throw exception for valid zip file name")
@Test
void shouldNotThrowException() {
void shouldNotThrowExceptionForValidZipFileName() {
assertThatCode(() -> creator.validateZipFileName(VALID_ZIP_FILE_NAME, PROCESS_ID, MESSAGE_TYPE_CODE))
.doesNotThrowAnyException();
}
@DisplayName("should throw client exception")
@DisplayName("should throw client exception for wrong zip file name")
@ParameterizedTest
@ValueSource(strings = {
"$processId_messageTypeCode.zip",
"processId_me$ssageTypeCode.zip",
"processId_messageTypeCode.zip$",
})
void shouldThrowClientException() {
assertThatThrownBy(() -> creator.validateZipFileName("processId_messageTypeCode.zip", PROCESS_ID, "wrongMessageTypeCode"))
void shouldThrowClientExceptionForWrongZipFileName(String wrongZipFileName) {
assertThatThrownBy(() -> creator.validateZipFileName(wrongZipFileName, PROCESS_ID, MESSAGE_TYPE_CODE))
.isInstanceOf(ClientException.class);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment