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