Added and rewrote tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user