Added and rewrote tests

This commit is contained in:
Marvin Scham
2023-06-28 04:31:26 +02:00
parent f32b7fc1c7
commit 44c9e0d9e4
19 changed files with 1145 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
package de.rwu.easydrop.util;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -55,4 +56,17 @@ class FormattingUtilTest {
Assertions.assertEquals(expectedFormattedAmount, formattedAmount);
}
@Test
void testRemoveSpaces_RemovesAllSpaces() {
String test1 = FormattingUtil.removeSpaces("this is a test");
String test2 = FormattingUtil.removeSpaces("another test");
String test3 = FormattingUtil.removeSpaces(" daring today, aren't we? ");
String test4 = FormattingUtil.removeSpaces("hehe");
assertEquals("thisisatest", test1);
assertEquals("anothertest", test2);
assertEquals("daringtoday,aren'twe?", test3);
assertEquals("hehe", test4);
}
}