diff options
Diffstat (limited to 'vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java')
-rw-r--r-- | vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java index ff3d8d20797..d7d5428c11b 100644 --- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java +++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/api/AthenzDomainTest.java @@ -1,14 +1,11 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.athenz.api; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.function.Supplier; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; /** * @author bjorncs @@ -16,28 +13,28 @@ import static org.junit.Assert.fail; public class AthenzDomainTest { @Test - public void domain_can_be_constructed_from_valid_string() { + void domain_can_be_constructed_from_valid_string() { new AthenzDomain("home.john.my-app"); } @Test - public void invalid_domain_throws_exception() { + void invalid_domain_throws_exception() { assertInvalid(() -> new AthenzDomain("endswithdot.")); assertInvalid(() -> new AthenzDomain(".startswithdot")); } @Test - public void parent_domain_is_without_name_suffix() { + void parent_domain_is_without_name_suffix() { assertEquals(new AthenzDomain("home.john"), new AthenzDomain("home.john.myapp").getParent()); } @Test - public void domain_name_suffix_is_the_suffix_after_last_dot() { + void domain_name_suffix_is_the_suffix_after_last_dot() { assertEquals("myapp", new AthenzDomain("home.john.myapp").getNameSuffix()); } @Test - public void domain_without_dot_is_toplevel() { + void domain_without_dot_is_toplevel() { assertTrue(new AthenzDomain("toplevel").isTopLevelDomain()); assertFalse(new AthenzDomain("not.toplevel").isTopLevelDomain()); } |