Skip to content

Commit 71fce80

Browse files
committed
Reduce noise from tests
1 parent 846dba1 commit 71fce80

File tree

6 files changed

+2
-30
lines changed

6 files changed

+2
-30
lines changed

java/src/main/java/io/cucumber/messages/cli/HtmlCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.cucumber.messages.cli;
22

33
import io.cucumber.htmlformatter.MessagesToHtmlWriter;
4-
import io.cucumber.jsonformatter.MessagesToJsonWriter;
54
import io.cucumber.messages.NdjsonToMessageIterable;
65
import picocli.CommandLine.Command;
76
import picocli.CommandLine.Model.CommandSpec;
@@ -52,7 +51,8 @@ public Integer call() throws IOException {
5251
var options = new CommonOptions(spec, source, output, HtmlCommand::html);
5352

5453
try (var envelopes = new NdjsonToMessageIterable(options.sourceInputStream(), Jackson.deserializer());
55-
var writer = MessagesToHtmlWriter.builder(Jackson.OBJECT_MAPPER::writeValue).build(options.outputPrintWriter())
54+
var writer = MessagesToHtmlWriter.builder(Jackson.OBJECT_MAPPER::writeValue)
55+
.build(options.outputPrintWriter())
5656
) {
5757
for (var envelope : envelopes) {
5858
writer.write(envelope);

java/src/test/java/io/cucumber/messages/cli/CucumberHtmlCommandTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.nio.file.Path;
1717
import java.nio.file.Paths;
1818

19-
import static java.nio.charset.StandardCharsets.UTF_8;
2019
import static java.nio.file.Files.newInputStream;
2120
import static java.nio.file.Files.readString;
2221
import static org.assertj.core.api.Assertions.assertThat;
@@ -49,9 +48,6 @@ void setup() {
4948
void cleanup() {
5049
System.setIn(originalSystemIn);
5150
System.setOut(originalSystemOut);
52-
// Helps with debugging
53-
System.out.println(stdOut.toString(UTF_8));
54-
System.out.println(stdErr);
5551
}
5652

5753
@Test

java/src/test/java/io/cucumber/messages/cli/CucumberJsonCommandTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.nio.file.Path;
1717
import java.nio.file.Paths;
1818

19-
import static java.nio.charset.StandardCharsets.UTF_8;
2019
import static java.nio.file.Files.newInputStream;
2120
import static java.nio.file.Files.readString;
2221
import static org.assertj.core.api.Assertions.assertThat;
@@ -50,9 +49,6 @@ void setup() {
5049
void cleanup() {
5150
System.setIn(originalSystemIn);
5251
System.setOut(originalSystemOut);
53-
// Helps with debugging
54-
System.out.println(stdOut.toString(UTF_8));
55-
System.out.println(stdErr);
5652
}
5753

5854
@Test

java/src/test/java/io/cucumber/messages/cli/JunitXmlCommandTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.nio.file.Path;
1717
import java.nio.file.Paths;
1818

19-
import static java.nio.charset.StandardCharsets.UTF_8;
2019
import static java.nio.file.Files.newInputStream;
2120
import static java.nio.file.Files.readString;
2221
import static org.assertj.core.api.Assertions.assertThat;
@@ -50,9 +49,6 @@ void setup() {
5049
void cleanup() {
5150
System.setIn(originalSystemIn);
5251
System.setOut(originalSystemOut);
53-
// Helps with debugging
54-
System.out.println(stdOut.toString(UTF_8));
55-
System.out.println(stdErr);
5652
}
5753

5854
@Test

java/src/test/java/io/cucumber/messages/cli/MessagesCliTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package io.cucumber.messages.cli;
22

3-
import org.junit.jupiter.api.AfterEach;
43
import org.junit.jupiter.api.BeforeEach;
54
import org.junit.jupiter.api.Test;
65
import picocli.CommandLine;
76

8-
import java.io.PrintStream;
97
import java.io.PrintWriter;
108
import java.io.StringWriter;
119
import java.util.regex.Pattern;
@@ -18,7 +16,6 @@ class MessagesCliTest {
1816
final StringWriter out = new StringWriter();
1917
final StringWriter err = new StringWriter();
2018
final CommandLine cmd = MessagesCli.createCommandLine();
21-
PrintStream originalSystemOut;
2219

2320

2421
@BeforeEach
@@ -27,15 +24,6 @@ void setup() {
2724
cmd.setOut(new PrintWriter(out));
2825
}
2926

30-
@AfterEach
31-
void cleanup() {
32-
// Helps with debugging
33-
System.out.println("Contents of out:");
34-
System.out.println(out);
35-
System.out.println("Contents of err:");
36-
System.out.println(err);
37-
}
38-
3927
@Test
4028
void help() {
4129
int exitCode = cmd.execute("--help");

java/src/test/java/io/cucumber/messages/cli/TestngXmlCommandTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.nio.file.Path;
1717
import java.nio.file.Paths;
1818

19-
import static java.nio.charset.StandardCharsets.UTF_8;
2019
import static java.nio.file.Files.newInputStream;
2120
import static java.nio.file.Files.readString;
2221
import static org.assertj.core.api.Assertions.assertThat;
@@ -50,9 +49,6 @@ void setup() {
5049
void cleanup() {
5150
System.setIn(originalSystemIn);
5251
System.setOut(originalSystemOut);
53-
// Helps with debugging
54-
System.out.println(stdOut.toString(UTF_8));
55-
System.out.println(stdErr);
5652
}
5753

5854
@Test

0 commit comments

Comments
 (0)