summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorarkadiusz.adamski <aadamski@est.tech>2021-04-22 12:24:48 +0100
committerArkadiusz Adamski <aadamski@est.tech>2021-05-07 14:08:01 +0000
commitdda2f96c2e7868f083641e8014f218a1b37f82e7 (patch)
tree0bf66944d02b66d3b9a552dbce2517bf9fd77e59 /model
parent082252a49027092ac1cc6c0f04d154bbbb07ad2b (diff)
Code coverage for File Carrier Plugin
- Increase code coverage for file carrier plugin in service engine Issue-ID: POLICY-3092 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: I8c08ee55c9d31792e35a1acc79330c8eef42af56
Diffstat (limited to 'model')
-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();
}
}