use of com.twosigma.beakerx.table.highlight.HeatmapHighlighter in project beakerx by twosigma.
the class HeatmapHighlighterSerializerTest method serializeMinValue_resultJsonHasMinValue.
@Test
public void serializeMinValue_resultJsonHasMinValue() throws IOException {
// given
HeatmapHighlighter heatmapHighlighter = (HeatmapHighlighter) TableDisplayCellHighlighter.getHeatmapHighlighter("a", 1, 10);
// when
JsonNode actualObj = serializeHeatmapHighlighter(heatmapHighlighter);
// then
Assertions.assertThat(actualObj.has("minVal")).isTrue();
Assertions.assertThat(actualObj.get("minVal").asInt()).isEqualTo(1);
}
use of com.twosigma.beakerx.table.highlight.HeatmapHighlighter in project beakerx by twosigma.
the class HeatmapHighlighterSerializerTest method serializeMinColor_resultJsonHasMinColor.
@Test
public void serializeMinColor_resultJsonHasMinColor() throws IOException {
// given
HeatmapHighlighter heatmapHighlighter = (HeatmapHighlighter) TableDisplayCellHighlighter.getHeatmapHighlighter("a", 1, 10, Color.BLACK, Color.BLUE);
// when
JsonNode actualObj = serializeHeatmapHighlighter(heatmapHighlighter);
// then
Assertions.assertThat(actualObj.has("minColor")).isTrue();
Assertions.assertThat(actualObj.get("minColor").get("rgb").asInt()).isEqualTo(Color.BLACK.getRGB());
}
use of com.twosigma.beakerx.table.highlight.HeatmapHighlighter in project beakerx by twosigma.
the class HeatmapHighlighterSerializerTest method serializeStyle_resultJsonHasStyle.
@Test
public void serializeStyle_resultJsonHasStyle() throws IOException {
// given
HeatmapHighlighter heatmapHighlighter = (HeatmapHighlighter) TableDisplayCellHighlighter.getHeatmapHighlighter("a", HighlightStyle.FULL_ROW);
// when
JsonNode actualObj = serializeHeatmapHighlighter(heatmapHighlighter);
// then
Assertions.assertThat(actualObj.has("style")).isTrue();
Assertions.assertThat(actualObj.get("style").asText()).isEqualTo("FULL_ROW");
}
Aggregations