diff options
author | Francis Toth <francis.toth@yoppworks.com> | 2020-06-18 15:23:12 -0400 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-06-21 07:05:18 +0000 |
commit | 9c414d7dbbe337c365b52f708ccd1c4ccf36021c (patch) | |
tree | bffb9aa71fd0d3d3cac4a9ea722ef0d9a13677dc /asdctool/src/test | |
parent | 8a44c78d37e82363cf572b6d9578e1cc6f6860bd (diff) |
Decouple TXT Report file writing and formatting logic (2/6)
This commit aims to move the reportStartValidatorRun function's logic from ReportManager (deprecated) to ReportFile.
Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I93c2e8f98cdef598094647d734d0deec0f1941db
Issue-ID: SDC-2499
Diffstat (limited to 'asdctool/src/test')
-rw-r--r-- | asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java index 53e56687a8..479421e118 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java @@ -176,15 +176,16 @@ public class ReportManagerTest { @Test public void testReportStartValidatorRun() { // when - ReportManager.reportStartValidatorRun(VALIDATOR_NAME, COMPONENT_SUM, txtReportFilePath); - - List<String> reportOutputFile = ReportManagerHelper.getReportOutputFileAsList(txtReportFilePath); + List<String> reportTxtFile = ReportFileNioHelper.withTxtFile(txtReportFilePath, file -> { + file.reportStartValidatorRun(VALIDATOR_NAME, COMPONENT_SUM); + return ReportFileNioHelper.readFileAsList(txtReportFilePath); + }); // then - assertNotNull(reportOutputFile); - assertEquals(EXPECTED_OUTPUT_FILE_HEADER, reportOutputFile.get(0)); + assertNotNull(reportTxtFile); + assertEquals(EXPECTED_OUTPUT_FILE_HEADER, reportTxtFile.get(0)); assertEquals("------ValidatorExecuter " + VALIDATOR_NAME + " Validation Started, on " - + COMPONENT_SUM + " components---------", reportOutputFile.get(2)); + + COMPONENT_SUM + " components---------", reportTxtFile.get(2)); } @Test |