summaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java')
-rw-r--r--clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java b/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java
index 2c9d9296aae..52b632c6eb8 100644
--- a/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java
+++ b/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/communication/http/writer/HttpWriterTest.java
@@ -1,10 +1,10 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.communication.http.writer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class HttpWriterTest {
@@ -19,34 +19,34 @@ public class HttpWriterTest {
+ "</html>\n";
@Test
- public void testStructure() {
+ void testStructure() {
HttpWriter writer = new HttpWriter();
String header = defaultHeader.replace(defaultTitle, "Untitled page");
assertEquals(header + defaultFooter, writer.toString());
}
@Test
- public void testTitle() {
+ void testTitle() {
HttpWriter writer = new HttpWriter().addTitle(defaultTitle);
assertEquals(defaultHeader + defaultFooter, writer.toString());
}
@Test
- public void testParagraph() {
+ void testParagraph() {
String paragraph = "This is a paragraph";
String paragraph2 = "More text";
HttpWriter writer = new HttpWriter().addTitle(defaultTitle).write(paragraph).write(paragraph2);
String content = " <p>\n"
- + " " + paragraph + "\n"
- + " </p>\n"
- + " <p>\n"
- + " " + paragraph2 + "\n"
- + " </p>\n";
+ + " " + paragraph + "\n"
+ + " </p>\n"
+ + " <p>\n"
+ + " " + paragraph2 + "\n"
+ + " </p>\n";
assertEquals(defaultHeader + content + defaultFooter, writer.toString());
}
@Test
- public void testLink() {
+ void testLink() {
String name = "My link";
String link = "/foo/bar?hmm";
HttpWriter writer = new HttpWriter().addTitle(defaultTitle).writeLink(name, link);
@@ -55,15 +55,15 @@ public class HttpWriterTest {
}
@Test
- public void testErrors() {
- try{
+ void testErrors() {
+ try {
HttpWriter writer = new HttpWriter().addTitle(defaultTitle);
writer.toString();
writer.write("foo");
assertTrue(false);
} catch (IllegalStateException e) {
}
- try{
+ try {
new HttpWriter().write("foo").addTitle("bar");
assertTrue(false);
} catch (IllegalStateException e) {