From 067b7b4b832a4791e4c40f8ef7df678082fc11f6 Mon Sep 17 00:00:00 2001 From: Tobias Herbert Date: Wed, 7 Feb 2024 11:54:13 +0100 Subject: [PATCH] test: added rightPrefix test --- .../java/org/example/AdministrationTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 1875272..745926d 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -43,4 +43,21 @@ class AdministrationTest { } + @Test + void rightPrefix() { + Administration administration = new Administration(); + + String full01 = "S1002"; + String full02 = "s100Z"; + String full03 = "X1004"; + + + boolean test01 = administration.rightPrefix(full01, 1); + boolean test02 = administration.rightPrefix(full02, 1); + boolean test03 = administration.rightPrefix(full03, 3); + + assertEquals(true, test01); + assertEquals(false, test02); + assertEquals(false, test03); + } } \ No newline at end of file