use of org.apache.jmeter.report.dashboard.JsonizerVisitor in project jmeter by apache.
the class CustomGraphConsumerTest method testInitializeExtraResults.
@Test
public void testInitializeExtraResults() {
customGraphConsumer.initializeExtraResults(resultData);
JsonizerVisitor jsonizer = new JsonizerVisitor();
for (Map.Entry<String, ResultData> entrySet : resultData.entrySet()) {
Object testedValue = entrySet.getValue().accept(jsonizer);
String key = entrySet.getKey();
if (key.equals("granularity")) {
assertThat(testedValue, equalTo("60000"));
} else if (key.equals("X_Axis")) {
assertThat(testedValue, equalTo("\"X axis name\""));
} else if (key.equals("Y_Axis")) {
assertThat(testedValue, equalTo("\"Y axis name\""));
} else if (key.equals("sample_Metric_Name")) {
assertThat(testedValue, equalTo("\"ulp_lag_ratio\""));
} else if (key.equals("content_Message")) {
assertThat(testedValue, equalTo("\"content message\""));
}
}
}
Aggregations