use of com.twosigma.beakerx.chart.xychart.TimePlot in project beakerx by twosigma.
the class GroovyEvaluatorChartTest method parseTimePlotScript_returnTimePlotObject.
@Test
public void parseTimePlotScript_returnTimePlotObject() {
// when
Object result = parseClassFromScript("def today = new Date();\n" + "def millis = today.time;\n" + "def hour = 1000 * 60 * 60;\n" + "def plot = new TimePlot( timeZone: new SimpleTimeZone(10800000, \"America/New_York\"));\n" + "plot << new Points(x:(0..10).collect{millis + hour * it}, y:(0..10));");
// then
Assertions.assertThat(result instanceof TimePlot).isTrue();
TimePlot timePlot = (TimePlot) result;
Assertions.assertThat(timePlot.getGraphics()).isNotEmpty();
}
Aggregations