@Test(dataProvider = "performanceDataRowsNonOverview") public void testAddPerformanceDataRow(String currentPerformanceData, String name, float duration, int warning, int critical, String expectedData) throws Exception { assertEquals(AbstractPerformanceDataBuilder.addPerformanceDataRow(currentPerformanceData, name, duration, warning, critical), expectedData); }
static String addPerformanceDataRow(String performanceData, String name, String value, String warning, String critical) { performanceData = (performanceData == null) ? "" : performanceData; name = (name == null) ? "" : StringUtils.replace(name.trim(), " ", "_"); value = (value == null) ? "" : value.trim(); warning = (warning == null) ? "" : warning.trim(); critical = (critical == null) ? "" : critical.trim(); return performanceData.concat(" ").concat(String.format(PERFORMANCE_DATA_TEMPLATE, name, value, warning, critical)).trim(); }
AbstractPerformanceDataBuilder { static String addPerformanceDataRow(String performanceData, String name, String value, String warning, String critical) { performanceData = (performanceData == null) ? "" : performanceData; name = (name == null) ? "" : StringUtils.replace(name.trim(), " ", "_"); value = (value == null) ? "" : value.trim(); warning = (warning == null) ? "" : warning.trim(); critical = (critical == null) ? "" : critical.trim(); return performanceData.concat(" ").concat(String.format(PERFORMANCE_DATA_TEMPLATE, name, value, warning, critical)).trim(); } }
AbstractPerformanceDataBuilder { static String addPerformanceDataRow(String performanceData, String name, String value, String warning, String critical) { performanceData = (performanceData == null) ? "" : performanceData; name = (name == null) ? "" : StringUtils.replace(name.trim(), " ", "_"); value = (value == null) ? "" : value.trim(); warning = (warning == null) ? "" : warning.trim(); critical = (critical == null) ? "" : critical.trim(); return performanceData.concat(" ").concat(String.format(PERFORMANCE_DATA_TEMPLATE, name, value, warning, critical)).trim(); }  }
AbstractPerformanceDataBuilder { static String addPerformanceDataRow(String performanceData, String name, String value, String warning, String critical) { performanceData = (performanceData == null) ? "" : performanceData; name = (name == null) ? "" : StringUtils.replace(name.trim(), " ", "_"); value = (value == null) ? "" : value.trim(); warning = (warning == null) ? "" : warning.trim(); critical = (critical == null) ? "" : critical.trim(); return performanceData.concat(" ").concat(String.format(PERFORMANCE_DATA_TEMPLATE, name, value, warning, critical)).trim(); }   }
AbstractPerformanceDataBuilder { static String addPerformanceDataRow(String performanceData, String name, String value, String warning, String critical) { performanceData = (performanceData == null) ? "" : performanceData; name = (name == null) ? "" : StringUtils.replace(name.trim(), " ", "_"); value = (value == null) ? "" : value.trim(); warning = (warning == null) ? "" : warning.trim(); critical = (critical == null) ? "" : critical.trim(); return performanceData.concat(" ").concat(String.format(PERFORMANCE_DATA_TEMPLATE, name, value, warning, critical)).trim(); }    }