diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2022-04-08 16:24:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 16:24:09 +0200 |
commit | 05606dfe1bba4bcadc1ae4fae95b626f6441cd52 (patch) | |
tree | f35c24e158a5cd86af535f51f1a6093d8c80322c /config-lib/src/test | |
parent | db9e570a36decb24e6cb13f44bd0ff444ab762e3 (diff) |
Revert "Jonmv/unify hostname classes"
Diffstat (limited to 'config-lib/src/test')
-rw-r--r-- | config-lib/src/test/java/com/yahoo/config/FileNodeTest.java | 5 | ||||
-rw-r--r-- | config-lib/src/test/java/com/yahoo/config/PathNodeTest.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java b/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java index 42e4978091d..1ad9f722eca 100644 --- a/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java +++ b/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java @@ -23,8 +23,9 @@ public class FileNodeTest { assertEquals("foo.txt", n.value().value()); assertEquals("\"foo.txt\"", n.toString()); - assertEquals("path may not start with '..', but got: foo/../../boo", - assertThrows(IllegalArgumentException.class, () -> new FileNode("foo/../../boo")).getMessage()); + assertThrows("path may not start with '..', but got: foo/../../boo", + IllegalArgumentException.class, + () -> new FileNode("foo/../../boo")); } } diff --git a/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java b/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java index 016c53b42e3..2240f647726 100644 --- a/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java +++ b/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java @@ -22,8 +22,9 @@ public class PathNodeTest { n = new PathNode(new FileReference("foo.txt")); assertEquals(new File("foo.txt").toPath(), n.value()); - assertEquals("path may not start with '..', but got: foo/../../boo", - assertThrows(IllegalArgumentException.class, () -> new PathNode(new FileReference("foo/../../boo"))).getMessage()); + assertThrows("path may not start with '..', but got: foo/../../boo", + IllegalArgumentException.class, + () -> new PathNode(new FileReference("foo/../../boo"))); } } |