Browse Source

test: added isNumber test

remotes/origin/fdai7780
Tobias Herbert 11 months ago
parent
commit
d0ca2545fc
  1. 23
      src/test/java/org/example/AdministrationTest.java

23
src/test/java/org/example/AdministrationTest.java

@ -20,4 +20,27 @@ class AdministrationTest {
} }
@Test
void isNumber() {
Administration administration = new Administration();
String full01 = "S1002";
String str1 = full01.substring(1);
String full02 = "S100Z";
String str2 = full02.substring(1);
String full03 = "P1004";
String str3 = full03.substring(1);
boolean test01 = administration.isNumber(str1);
boolean test02 = administration.isNumber(str2);
boolean test03 = administration.isNumber(str3);
assertEquals(true, test01);
assertEquals(false, test02);
assertEquals(true, test03);
}
} }
Loading…
Cancel
Save