diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 12:05:23 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 12:05:23 +0100 |
commit | b8699860653e593271e50c8ba1b73f66fcb6287c (patch) | |
tree | a7029ee71f1539d269fda241a3f345255783dcf1 /src/test/java/io/trygvis/rules/acme | |
parent | 9eac79348242b5dc33f4cccdd86beda2a4ed4746 (diff) | |
download | rules-sandbox-b8699860653e593271e50c8ba1b73f66fcb6287c.tar.gz rules-sandbox-b8699860653e593271e50c8ba1b73f66fcb6287c.tar.bz2 rules-sandbox-b8699860653e593271e50c8ba1b73f66fcb6287c.tar.xz rules-sandbox-b8699860653e593271e50c8ba1b73f66fcb6287c.zip |
Starting on splitting up into different modules.
Diffstat (limited to 'src/test/java/io/trygvis/rules/acme')
-rw-r--r-- | src/test/java/io/trygvis/rules/acme/IpCalcTest.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/java/io/trygvis/rules/acme/IpCalcTest.java b/src/test/java/io/trygvis/rules/acme/IpCalcTest.java deleted file mode 100644 index 8b1e2c6..0000000 --- a/src/test/java/io/trygvis/rules/acme/IpCalcTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package io.trygvis.rules.acme; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; - -import static org.junit.jupiter.api.Assertions.*; - -class IpCalcTest { - - @Test - public void basic() { - Assertions.assertThrows(IllegalArgumentException.class, () -> IpCalc.cidr("192.168.1.1/24").addresses()); - assertEquals(256, IpCalc.cidr("192.168.1.0/24").addresses().size()); - assertEquals(128, IpCalc.cidr("192.168.1.128/25").addresses().size()); - } - - @ParameterizedTest - @ValueSource(strings = { - "192.168.1.0/24", - "192.168.1.128/25", - }) - public void testParsing(String s) { - assertEquals(s, IpCalc.cidr(s).toString()); - } -} |