diff options
author | Erlend <erlendniko@hotmail.com> | 2022-07-29 14:26:26 +0200 |
---|---|---|
committer | Erlend <erlendniko@hotmail.com> | 2022-07-29 14:26:26 +0200 |
commit | 79336a368800c0e2b691b34cbeccd9f93be5db90 (patch) | |
tree | 5336ad08fc202c93b680eb3b9b4a4cd1133376f4 /jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java | |
parent | 362438cc3eb855854aa6110cf01667f80dd10ba0 (diff) | |
parent | 3afb44d4e4328b2732f65b4a436baa2ce2c850b0 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java')
-rw-r--r-- | jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java index abe47662970..8a01406940f 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/application/GlobPatternTestCase.java @@ -1,18 +1,18 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jdisc.application; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Simon Thoresen Hult @@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue; public class GlobPatternTestCase { @Test - public void requireThatCompileCreatesExpectedParts() { + void requireThatCompileCreatesExpectedParts() { assertToString("foo"); assertToString("*foo"); assertToString("*oo"); @@ -38,7 +38,7 @@ public class GlobPatternTestCase { } @Test - public void requireThatGlobMatcherWorks() { + void requireThatGlobMatcherWorks() { assertMatch("foo", "foo", Collections.<String>emptyList()); assertNotMatch("foo", "bar"); @@ -81,7 +81,7 @@ public class GlobPatternTestCase { } @Test - public void requireThatGlobPatternOrdersMoreSpecificFirst() { + void requireThatGlobPatternOrdersMoreSpecificFirst() { assertCompareEq("foo", "foo"); assertCompareLt("foo", "foo*"); assertCompareLt("foo", "*foo"); @@ -112,15 +112,15 @@ public class GlobPatternTestCase { } @Test - public void requireThatEqualsIsImplemented() { - assertTrue(GlobPattern.compile("foo").equals(GlobPattern.compile("foo"))); - assertFalse(GlobPattern.compile("foo").equals(GlobPattern.compile("bar"))); + void requireThatEqualsIsImplemented() { + assertEquals(GlobPattern.compile("foo"), GlobPattern.compile("foo")); + assertNotEquals(GlobPattern.compile("foo"), GlobPattern.compile("bar")); } @Test - public void requireThatHashCodeIsImplemented() { - assertTrue(GlobPattern.compile("foo").hashCode() == GlobPattern.compile("foo").hashCode()); - assertFalse(GlobPattern.compile("foo").hashCode() == GlobPattern.compile("bar").hashCode()); + void requireThatHashCodeIsImplemented() { + assertEquals(GlobPattern.compile("foo").hashCode(), GlobPattern.compile("foo").hashCode()); + assertNotNull(GlobPattern.compile("bar").hashCode()); } private static void assertCompareLt(String lhs, String rhs) { |