Skip to content

Commit 0afb955

Browse files
committed
v16.16.17
1 parent a48c47f commit 0afb955

File tree

9 files changed

+33
-117
lines changed

9 files changed

+33
-117
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-parent</artifactId>
9-
<version>16.16.16</version>
9+
<version>16.16.17</version>
1010
</parent>
1111
<artifactId>schemacrawler-database-plugins-parent</artifactId>
1212
<packaging>pom</packaging>

schemacrawler-hana/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-parent</artifactId>
9-
<version>16.16.16</version>
9+
<version>16.16.17</version>
1010
</parent>
1111
<artifactId>schemacrawler-hana</artifactId>
1212
<packaging>jar</packaging>

schemacrawler-hana/src/test/java/schemacrawler/integration/test/CommandLineHelpTest.java

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,29 @@
3333
import static schemacrawler.test.utility.FileHasContent.hasSameContentAs;
3434
import static schemacrawler.test.utility.FileHasContent.outputOf;
3535

36-
import java.io.FileDescriptor;
37-
import java.io.FileOutputStream;
38-
import java.io.PrintStream;
39-
40-
import org.junit.jupiter.api.AfterEach;
41-
import org.junit.jupiter.api.BeforeEach;
4236
import org.junit.jupiter.api.Test;
4337

4438
import schemacrawler.Main;
39+
import schemacrawler.test.utility.CaptureSystemStreams;
40+
import schemacrawler.test.utility.CapturedSystemStreams;
4541
import schemacrawler.test.utility.ResolveTestContext;
4642
import schemacrawler.test.utility.TestContext;
47-
import schemacrawler.test.utility.TestOutputStream;
4843

4944
@ResolveTestContext
45+
@CaptureSystemStreams
5046
public class CommandLineHelpTest {
5147

5248
private static final String COMMAND_LINE_HELP_OUTPUT = "command_line_help_output/";
5349

54-
private TestOutputStream err;
55-
private TestOutputStream out;
56-
57-
@AfterEach
58-
public void cleanUpStreams() {
59-
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
60-
System.setErr(new PrintStream(new FileOutputStream(FileDescriptor.err)));
61-
}
62-
6350
@Test
64-
public void commandLineHelp(final TestContext testContext) throws Exception {
51+
public void commandLineHelp(final TestContext testContext, final CapturedSystemStreams streams)
52+
throws Exception {
6553
final String server = "hana";
6654
Main.main("--help", "server:" + server);
6755

68-
assertThat(outputOf(err), hasNoContent());
56+
assertThat(outputOf(streams.err()), hasNoContent());
6957
assertThat(
70-
outputOf(out),
58+
outputOf(streams.out()),
7159
hasSameContentAs(classpathResource(COMMAND_LINE_HELP_OUTPUT + server + ".help.txt")));
7260
}
73-
74-
@BeforeEach
75-
public void setUpStreams() throws Exception {
76-
out = new TestOutputStream();
77-
System.setOut(new PrintStream(out));
78-
79-
err = new TestOutputStream();
80-
System.setErr(new PrintStream(err));
81-
}
8261
}

schemacrawler-sapiq/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>us.fatehi</groupId>
99
<artifactId>schemacrawler-parent</artifactId>
10-
<version>16.16.16</version>
10+
<version>16.16.17</version>
1111
</parent>
1212
<artifactId>schemacrawler-sapiq</artifactId>
1313
<packaging>jar</packaging>

schemacrawler-sapiq/src/test/java/schemacrawler/integration/test/CommandLineHelpTest.java

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,29 @@
3333
import static schemacrawler.test.utility.FileHasContent.hasSameContentAs;
3434
import static schemacrawler.test.utility.FileHasContent.outputOf;
3535

36-
import java.io.FileDescriptor;
37-
import java.io.FileOutputStream;
38-
import java.io.PrintStream;
39-
40-
import org.junit.jupiter.api.AfterEach;
41-
import org.junit.jupiter.api.BeforeEach;
4236
import org.junit.jupiter.api.Test;
4337

4438
import schemacrawler.Main;
39+
import schemacrawler.test.utility.CaptureSystemStreams;
40+
import schemacrawler.test.utility.CapturedSystemStreams;
4541
import schemacrawler.test.utility.ResolveTestContext;
4642
import schemacrawler.test.utility.TestContext;
47-
import schemacrawler.test.utility.TestOutputStream;
4843

4944
@ResolveTestContext
45+
@CaptureSystemStreams
5046
public class CommandLineHelpTest {
5147

5248
private static final String COMMAND_LINE_HELP_OUTPUT = "command_line_help_output/";
5349

54-
private TestOutputStream err;
55-
private TestOutputStream out;
56-
57-
@AfterEach
58-
public void cleanUpStreams() {
59-
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
60-
System.setErr(new PrintStream(new FileOutputStream(FileDescriptor.err)));
61-
}
62-
6350
@Test
64-
public void commandLineHelp(final TestContext testContext) throws Exception {
51+
public void commandLineHelp(final TestContext testContext, final CapturedSystemStreams streams)
52+
throws Exception {
6553
final String server = "sapiq";
6654
Main.main("--help", "server:" + server);
6755

68-
assertThat(outputOf(err), hasNoContent());
56+
assertThat(outputOf(streams.err()), hasNoContent());
6957
assertThat(
70-
outputOf(out),
58+
outputOf(streams.out()),
7159
hasSameContentAs(classpathResource(COMMAND_LINE_HELP_OUTPUT + server + ".help.txt")));
7260
}
73-
74-
@BeforeEach
75-
public void setUpStreams() throws Exception {
76-
out = new TestOutputStream();
77-
System.setOut(new PrintStream(out));
78-
79-
err = new TestOutputStream();
80-
System.setErr(new PrintStream(err));
81-
}
8261
}

schemacrawler-teiid/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>us.fatehi</groupId>
66
<artifactId>schemacrawler-parent</artifactId>
7-
<version>16.16.16</version>
7+
<version>16.16.17</version>
88
</parent>
99
<artifactId>schemacrawler-teiid</artifactId>
1010
<packaging>jar</packaging>

schemacrawler-teiid/src/test/java/schemacrawler/integration/test/CommandLineHelpTest.java

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,29 @@
3333
import static schemacrawler.test.utility.FileHasContent.hasSameContentAs;
3434
import static schemacrawler.test.utility.FileHasContent.outputOf;
3535

36-
import java.io.FileDescriptor;
37-
import java.io.FileOutputStream;
38-
import java.io.PrintStream;
39-
40-
import org.junit.jupiter.api.AfterEach;
41-
import org.junit.jupiter.api.BeforeEach;
4236
import org.junit.jupiter.api.Test;
4337

4438
import schemacrawler.Main;
39+
import schemacrawler.test.utility.CaptureSystemStreams;
40+
import schemacrawler.test.utility.CapturedSystemStreams;
4541
import schemacrawler.test.utility.ResolveTestContext;
4642
import schemacrawler.test.utility.TestContext;
47-
import schemacrawler.test.utility.TestOutputStream;
4843

4944
@ResolveTestContext
45+
@CaptureSystemStreams
5046
public class CommandLineHelpTest {
5147

5248
private static final String COMMAND_LINE_HELP_OUTPUT = "command_line_help_output/";
5349

54-
private TestOutputStream err;
55-
private TestOutputStream out;
56-
57-
@AfterEach
58-
public void cleanUpStreams() {
59-
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
60-
System.setErr(new PrintStream(new FileOutputStream(FileDescriptor.err)));
61-
}
62-
6350
@Test
64-
public void commandLineHelp(final TestContext testContext) throws Exception {
51+
public void commandLineHelp(final TestContext testContext, final CapturedSystemStreams streams)
52+
throws Exception {
6553
final String server = "teiid";
6654
Main.main("--help", "server:" + server);
6755

68-
assertThat(outputOf(err), hasNoContent());
56+
assertThat(outputOf(streams.err()), hasNoContent());
6957
assertThat(
70-
outputOf(out),
58+
outputOf(streams.out()),
7159
hasSameContentAs(classpathResource(COMMAND_LINE_HELP_OUTPUT + server + ".help.txt")));
7260
}
73-
74-
@BeforeEach
75-
public void setUpStreams() throws Exception {
76-
out = new TestOutputStream();
77-
System.setOut(new PrintStream(out));
78-
79-
err = new TestOutputStream();
80-
System.setErr(new PrintStream(err));
81-
}
8261
}

schemacrawler-timesten/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-parent</artifactId>
9-
<version>16.16.16</version>
9+
<version>16.16.17</version>
1010
</parent>
1111
<artifactId>schemacrawler-timesten</artifactId>
1212
<packaging>jar</packaging>

schemacrawler-timesten/src/test/java/schemacrawler/integration/test/CommandLineHelpTest.java

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,29 @@
3333
import static schemacrawler.test.utility.FileHasContent.hasSameContentAs;
3434
import static schemacrawler.test.utility.FileHasContent.outputOf;
3535

36-
import java.io.FileDescriptor;
37-
import java.io.FileOutputStream;
38-
import java.io.PrintStream;
39-
40-
import org.junit.jupiter.api.AfterEach;
41-
import org.junit.jupiter.api.BeforeEach;
4236
import org.junit.jupiter.api.Test;
4337

4438
import schemacrawler.Main;
39+
import schemacrawler.test.utility.CaptureSystemStreams;
40+
import schemacrawler.test.utility.CapturedSystemStreams;
4541
import schemacrawler.test.utility.ResolveTestContext;
4642
import schemacrawler.test.utility.TestContext;
47-
import schemacrawler.test.utility.TestOutputStream;
4843

4944
@ResolveTestContext
45+
@CaptureSystemStreams
5046
public class CommandLineHelpTest {
5147

5248
private static final String COMMAND_LINE_HELP_OUTPUT = "command_line_help_output/";
5349

54-
private TestOutputStream err;
55-
private TestOutputStream out;
56-
57-
@AfterEach
58-
public void cleanUpStreams() {
59-
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
60-
System.setErr(new PrintStream(new FileOutputStream(FileDescriptor.err)));
61-
}
62-
6350
@Test
64-
public void commandLineHelp(final TestContext testContext) throws Exception {
51+
public void commandLineHelp(final TestContext testContext, final CapturedSystemStreams streams)
52+
throws Exception {
6553
final String server = "timesten";
6654
Main.main("--help", "server:" + server);
6755

68-
assertThat(outputOf(err), hasNoContent());
56+
assertThat(outputOf(streams.err()), hasNoContent());
6957
assertThat(
70-
outputOf(out),
58+
outputOf(streams.out()),
7159
hasSameContentAs(classpathResource(COMMAND_LINE_HELP_OUTPUT + server + ".help.txt")));
7260
}
73-
74-
@BeforeEach
75-
public void setUpStreams() throws Exception {
76-
out = new TestOutputStream();
77-
System.setOut(new PrintStream(out));
78-
79-
err = new TestOutputStream();
80-
System.setErr(new PrintStream(err));
81-
}
8261
}

0 commit comments

Comments
 (0)