Search in sources :

Example 11 with ConstantBand

use of com.twosigma.beakerx.chart.xychart.plotitem.ConstantBand in project beakerx by twosigma.

the class XYChartTest method shouldSendCommMsgWhenAddConstantBandByLeftShift.

@Test
public void shouldSendCommMsgWhenAddConstantBandByLeftShift() throws Exception {
    // given
    XYChart xyChart = createWidget();
    // when
    xyChart.leftShift(new ConstantBand());
    // then
    List valueAsArray = getValueAsArray(CONSTANT_BANDS);
    Map actual = (Map) valueAsArray.get(0);
    assertThat(actual.get(ConstantBandSerializer.TYPE)).isEqualTo(ConstantBand.class.getSimpleName());
}
Also used : ConstantBand(com.twosigma.beakerx.chart.xychart.plotitem.ConstantBand) ArrayList(java.util.ArrayList) List(java.util.List) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) AbstractChartTest(com.twosigma.beakerx.chart.AbstractChartTest) Test(org.junit.Test)

Aggregations

ConstantBand (com.twosigma.beakerx.chart.xychart.plotitem.ConstantBand)11 Test (org.junit.Test)10 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 DefaultSerializerProvider (com.fasterxml.jackson.databind.ser.DefaultSerializerProvider)8 ArrayList (java.util.ArrayList)2 LinkedHashMap (java.util.LinkedHashMap)2 List (java.util.List)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 KernelTest (com.twosigma.beakerx.KernelTest)1 AbstractChartTest (com.twosigma.beakerx.chart.AbstractChartTest)1 ConstantLine (com.twosigma.beakerx.chart.xychart.plotitem.ConstantLine)1 Rasters (com.twosigma.beakerx.chart.xychart.plotitem.Rasters)1 Text (com.twosigma.beakerx.chart.xychart.plotitem.Text)1 BigInteger (java.math.BigInteger)1 Map (java.util.Map)1