aboutsummaryrefslogtreecommitdiffstats
path: root/model/basic-model/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'model/basic-model/src/test/java')
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
index 0b18abcb1..3385830e2 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
@@ -28,9 +28,16 @@ import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
+import org.junit.After;
import org.junit.Test;
public class ApexSchemaGeneratorTest {
+ private final PrintStream stdout = System.out;
+
+ @After
+ public void tearDown() throws Exception {
+ System.setOut(stdout);
+ }
@Test
public void test() throws IOException {
@@ -78,12 +85,11 @@ public class ApexSchemaGeneratorTest {
System.setOut(new PrintStream(baos5));
final File tempFile = File.createTempFile("ApexSchemaGeneratorTest", "xsd");
+ tempFile.deleteOnExit();
final String[] args5 =
{ "org.onap.policy.apex.model.basicmodel.concepts.AxModel", tempFile.getCanonicalPath() };
ApexSchemaGenerator.main(args5);
assertTrue(tempFile.length() > 100);
- System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
- tempFile.delete();
}
}