+ fBot.waitUntil(new DefaultCondition() {
+ private String fFailureMessage;
+
+ @Override
+ public boolean test() throws Exception {
+ int length = chart.getSeriesSet().getSeries().length;
+ if (length != EXPECTED_NUM_SERIES){
+ fFailureMessage = "Chart did not contain the expected number series. Actual " + length + ", expected " + EXPECTED_NUM_SERIES;
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return fFailureMessage;
+ }
+ });
+
+ ISeriesSet seriesSet = chart.getSeriesSet();
+ ISeries[] series = seriesSet.getSeries();
+ assertEquals(EXPECTED_NUM_SERIES, series.length);