@Test(dataProvider = "testGenerateTestCaseStepInformationDP") public void testGenerateTestCaseStepInformation(TestCaseStep[] testCaseSteps, String expectedTestCaseStepInformation) throws Exception { SortedSet<TestCaseStep> input = new TreeSet<>(); input.addAll(Arrays.asList(testCaseSteps)); assertEquals(AbstractOutputBuilder.generateStepInformation(input), expectedTestCaseStepInformation); }
static String generateStepInformation(SortedSet<TestCaseStep> steps) { StringBuilder sb = new StringBuilder(); steps.stream().filter(step -> step.getState().isWarning() || step.getState().isError()) .forEach(step -> { sb.append(", step \"").append(step.getName()).append("\" "); if (step.getState().isError()) { sb.append("EXCEPTION: ").append(step.getExceptionMessages(true)); } else { sb.append("over runtime (") .append(TimeFormatter.formatToSec(step.getDuration())) .append("/warn at ") .append(TimeFormatter.formatToSec(step.getWarningTime())) .append(")"); } }); return sb.toString(); }
AbstractOutputBuilder { static String generateStepInformation(SortedSet<TestCaseStep> steps) { StringBuilder sb = new StringBuilder(); steps.stream().filter(step -> step.getState().isWarning() || step.getState().isError()) .forEach(step -> { sb.append(", step \"").append(step.getName()).append("\" "); if (step.getState().isError()) { sb.append("EXCEPTION: ").append(step.getExceptionMessages(true)); } else { sb.append("over runtime (") .append(TimeFormatter.formatToSec(step.getDuration())) .append("/warn at ") .append(TimeFormatter.formatToSec(step.getWarningTime())) .append(")"); } }); return sb.toString(); } }
AbstractOutputBuilder { static String generateStepInformation(SortedSet<TestCaseStep> steps) { StringBuilder sb = new StringBuilder(); steps.stream().filter(step -> step.getState().isWarning() || step.getState().isError()) .forEach(step -> { sb.append(", step \"").append(step.getName()).append("\" "); if (step.getState().isError()) { sb.append("EXCEPTION: ").append(step.getExceptionMessages(true)); } else { sb.append("over runtime (") .append(TimeFormatter.formatToSec(step.getDuration())) .append("/warn at ") .append(TimeFormatter.formatToSec(step.getWarningTime())) .append(")"); } }); return sb.toString(); }  }
AbstractOutputBuilder { static String generateStepInformation(SortedSet<TestCaseStep> steps) { StringBuilder sb = new StringBuilder(); steps.stream().filter(step -> step.getState().isWarning() || step.getState().isError()) .forEach(step -> { sb.append(", step \"").append(step.getName()).append("\" "); if (step.getState().isError()) { sb.append("EXCEPTION: ").append(step.getExceptionMessages(true)); } else { sb.append("over runtime (") .append(TimeFormatter.formatToSec(step.getDuration())) .append("/warn at ") .append(TimeFormatter.formatToSec(step.getWarningTime())) .append(")"); } }); return sb.toString(); }  static String replacePlaceHolder(String message, PlaceholderMap placeholderStringMap); }
AbstractOutputBuilder { static String generateStepInformation(SortedSet<TestCaseStep> steps) { StringBuilder sb = new StringBuilder(); steps.stream().filter(step -> step.getState().isWarning() || step.getState().isError()) .forEach(step -> { sb.append(", step \"").append(step.getName()).append("\" "); if (step.getState().isError()) { sb.append("EXCEPTION: ").append(step.getExceptionMessages(true)); } else { sb.append("over runtime (") .append(TimeFormatter.formatToSec(step.getDuration())) .append("/warn at ") .append(TimeFormatter.formatToSec(step.getWarningTime())) .append(")"); } }); return sb.toString(); }  static String replacePlaceHolder(String message, PlaceholderMap placeholderStringMap); final static SimpleDateFormat dateFormat; }