|
@ -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); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |