diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-12-21 15:18:14 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-12-21 15:43:26 +0100 |
commit | e0fb5474ac171436e263a4950d72a2a405d379a2 (patch) | |
tree | 0b754bd09a06ef419a56f9df586446b386106669 /application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java | |
parent | 28ae61202ad963955cf92719bab9b9d97181d5dd (diff) |
GC use of deprecated junit assertThat and unify
Diffstat (limited to 'application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java')
-rw-r--r-- | application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java b/application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java index 40bdf023c63..e1e520bccc9 100644 --- a/application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java +++ b/application/src/test/java/com/yahoo/application/container/ContainerSchemaTest.java @@ -10,9 +10,8 @@ import org.junit.Test; import java.nio.charset.StandardCharsets; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @author gjoranv @@ -28,7 +27,7 @@ public class ContainerSchemaTest { byte[] rendered = container.search().processAndRender(ComponentSpecification.fromString("mychain"), ComponentSpecification.fromString("XmlRenderer"), new Query("")); String renderedAsString = new String(rendered, StandardCharsets.UTF_8); - assertThat(renderedAsString, containsString(searcherId)); + assertTrue(renderedAsString.contains(searcherId)); } } @@ -40,7 +39,7 @@ public class ContainerSchemaTest { Search searching = container.search(); Result result = searching.process(ComponentSpecification.fromString("mychain"), new Query("")); String hitTitle = result.hits().get(0).getField("title").toString(); - assertThat(hitTitle, is(searcherId)); + assertEquals(searcherId, hitTitle); } } |