diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-03-02 15:34:39 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-03-02 15:34:39 +0100 |
commit | 3844b4dbcc5e03489e82924ac2e1707897f9e43e (patch) | |
tree | fa450261161697fc44cd89b68ef97ed1afa5e575 /container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java | |
parent | 8ec5743e254b039fe860339fdc4b5ab4aa1f0364 (diff) |
Remove junit.fdramework usage
Diffstat (limited to 'container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java')
-rw-r--r-- | container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java b/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java index 747cb2f83cb..ceafbc18272 100644 --- a/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java +++ b/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java @@ -1,13 +1,17 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.container.logging; +import org.junit.Test; + import java.net.URI; +import static org.junit.Assert.assertEquals; + /** * @author frodelu */ -public class JSONLogTestCase extends junit.framework.TestCase { +public class JSONLogTestCase { private static String ipAddress = "152.200.54.243"; private static final String EMPTY_REFERRER = ""; @@ -35,6 +39,7 @@ public class JSONLogTestCase extends junit.framework.TestCase { return URI.create("http://localhost?query=" + query); } + @Test public void test_json_log_entry() throws Exception { AccessLogEntry entry = newAccessLogEntry("test"); @@ -60,7 +65,8 @@ public class JSONLogTestCase extends junit.framework.TestCase { assertEquals(expectedOutput, new JSONFormatter(entry).format()); } - public void test_with_keyvalues() throws Exception { + @Test + public void test_with_keyvalues() { AccessLogEntry entry = newAccessLogEntry("test"); entry.addKeyValue("singlevalue", "value1"); entry.addKeyValue("multivalue", "value2"); @@ -92,6 +98,7 @@ public class JSONLogTestCase extends junit.framework.TestCase { } + @Test public void test_with_remoteaddrport() throws Exception { AccessLogEntry entry = newAccessLogEntry("test"); @@ -147,6 +154,7 @@ public class JSONLogTestCase extends junit.framework.TestCase { assertEquals(expectedOutput, new JSONFormatter(entry).format()); } + @Test public void test_remote_address_same_as_ip_address() throws Exception { AccessLogEntry entry = newAccessLogEntry("test"); AccessLogEntry entrywithremote = newAccessLogEntry("test"); @@ -155,7 +163,8 @@ public class JSONLogTestCase extends junit.framework.TestCase { assertEquals(new JSONFormatter(entry).format(), new JSONFormatter(entrywithremote).format()); } - public void test_useragent_with_quotes() throws Exception { + @Test + public void test_useragent_with_quotes() { final AccessLogEntry entry = new AccessLogEntry(); entry.setRawQuery("query=test"); entry.setRawPath(""); |