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

BAEL-5942 Code changes #13147

Merged
merged 11 commits into from
Jan 22, 2023
Prev Previous commit
Next Next commit
BAEL-5942 Test updates from Review
  • Loading branch information
brokenhardisk committed Jan 11, 2023
commit 12db46fa106ca7ea3f36b2ae0b392918c27748a2
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ class CustomMultipartFileUnitTest {
void whenProvidingByteArray_thenMultipartFileCreated() throws IOException {
byte[] inputArray = "Test String".getBytes();
CustomMultipartFile customMultipartFile = new CustomMultipartFile(inputArray);
Assertions.assertFalse(customMultipartFile.isEmpty());
Assertions.assertArrayEquals(inputArray, customMultipartFile.getBytes());
Assertions.assertEquals(inputArray.length,customMultipartFile.getSize());
}

@Test
void whenProvidingByteArray_thenMockMultipartFileCreated() throws IOException {
byte[] inputArray = "Test String".getBytes();
MockMultipartFile mockMultipartFile = new MockMultipartFile("tempFileName", inputArray);
Assertions.assertFalse(mockMultipartFile.isEmpty());
Assertions.assertArrayEquals(inputArray, mockMultipartFile.getBytes());
Assertions.assertEquals(inputArray.length,mockMultipartFile.getSize());
}
}