summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/test/java')
-rw-r--r--aai-core/src/test/java/org/openecomp/aai/dbmodel/DbEdgeRulesConverterTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/aai-core/src/test/java/org/openecomp/aai/dbmodel/DbEdgeRulesConverterTest.java b/aai-core/src/test/java/org/openecomp/aai/dbmodel/DbEdgeRulesConverterTest.java
index 1310a05b..3a1d9cc1 100644
--- a/aai-core/src/test/java/org/openecomp/aai/dbmodel/DbEdgeRulesConverterTest.java
+++ b/aai-core/src/test/java/org/openecomp/aai/dbmodel/DbEdgeRulesConverterTest.java
@@ -73,15 +73,18 @@ public class DbEdgeRulesConverterTest {
.putAll("baz|quux",
"treatsVeryKindly,IN,One2One,true,true,true,true")
.build();
-
+
try {
dberCon.setup(dest);
File result = new File(outFile);
+ //Add delete hook to delete the temporary result file on exit/
+ result.deleteOnExit();
FileOutputStream writeStream = new FileOutputStream(result);
Writer writer = new OutputStreamWriter(writeStream);
dberCon.convert(EdgeRules, writer);
File compare = new File("src/test/resources/dbEdgeRulesConversion/conversionTestCompare.json");
assertTrue(FileUtils.contentEquals(result, compare));
+ writer.close();
} catch (IOException e) {
e.printStackTrace();
fail("IOException on setup");