summaryrefslogtreecommitdiff
path: root/src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-09-07 15:15:19 +0200
committerGitHub2026-09-07 15:15:19 +0200
commit37314fca05468a3bfa8d4c3d23584586463a97fa (patch)
tree7b1def283bed1fe9d7d430ca7e0481491b92f698 /src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java
parentcdcdb21eca393b17ac5d075c5a002d30ccf038c5 (diff)
feat!: only add level 4/5 ATC codes (#295)
ATC codes like `L`, `L01`, `L01E` are not imported any more and cannot be used as ATC code from database. These codes (from database) will be treated as unregistered code instead.
Diffstat (limited to 'src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java')
-rw-r--r--src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java b/src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java
index 35fd34e..cab7afd 100644
--- a/src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java
+++ b/src/test/java/dev/dnpm/oshelper/atc/AtcCodeTest.java
@@ -28,8 +28,6 @@ class AtcCodeTest {
@Test
void testShouldDetectAtcCodeScheme() {
- assertTrue(AtcCode.isAtcCode("L01"));
- assertTrue(AtcCode.isAtcCode("L01A"));
assertTrue(AtcCode.isAtcCode("L01AA"));
assertTrue(AtcCode.isAtcCode("L01AA01"));
}
@@ -43,4 +41,10 @@ class AtcCodeTest {
assertFalse(AtcCode.isAtcCode("Z01AA"));
assertFalse(AtcCode.isAtcCode("L01AA0"));
}
+
+ @Test
+ void testShouldNotAcceptAtcCodeShorterThanLevel4Or5() {
+ assertFalse(AtcCode.isAtcCode("L01"));
+ assertFalse(AtcCode.isAtcCode("L01A"));
+ }
}