Refactor CustomisedReports
@@ -31,8 +31,7 @@ public class CustomisedReports implements IReporter {
initReportTemplate();
for (ISuite suite : suites) {
Map<String, ISuiteResult> suiteResults = suite.getResults();
- for (String testName : suiteResults.keySet()) {
- ISuiteResult suiteResult = suiteResults.get(testName);
+ suiteResults.forEach((testName, suiteResult) -> {
ITestContext testContext = suiteResult.getTestContext();
IResultMap failedResult = testContext.getFailedTests();
@@ -52,8 +51,7 @@ public class CustomisedReports implements IReporter {
for (ITestResult testResult : testsSkipped) {
reportWriter.println(String.format(resultRow, "warning", suite.getName(), testName, testResult.getName(), "SKIPPED", "NA"));
}
-
- }
+ });
}
finishReportTemplate();
reportWriter.flush();
