use of com.twosigma.beakerx.table.highlight.UniqueEntriesHighlighter in project beakerx by twosigma.
the class UniqueEntriesHighlighterSerializerTest method serializeColumnName_resultJsonHasColumnName.
@Test
public void serializeColumnName_resultJsonHasColumnName() throws IOException {
// given
UniqueEntriesHighlighter highlighter = (UniqueEntriesHighlighter) TableDisplayCellHighlighter.getUniqueEntriesHighlighter("a");
// when
JsonNode actualObj = serializeHighliter(highlighter);
// then
Assertions.assertThat(actualObj.has("colName")).isTrue();
Assertions.assertThat(actualObj.get("colName").asText()).isEqualTo("a");
}
use of com.twosigma.beakerx.table.highlight.UniqueEntriesHighlighter in project beakerx by twosigma.
the class UniqueEntriesHighlighterSerializerTest method serializeUniqueEntriesHighlighter_resultJsonHasType.
@Test
public void serializeUniqueEntriesHighlighter_resultJsonHasType() throws IOException {
// given
UniqueEntriesHighlighter highlighter = (UniqueEntriesHighlighter) TableDisplayCellHighlighter.getUniqueEntriesHighlighter("a");
// when
JsonNode actualObj = serializeHighliter(highlighter);
// then
Assertions.assertThat(actualObj.has("type")).isTrue();
Assertions.assertThat(actualObj.get("type").asText()).isEqualTo("UniqueEntriesHighlighter");
}
use of com.twosigma.beakerx.table.highlight.UniqueEntriesHighlighter in project beakerx by twosigma.
the class UniqueEntriesHighlighterSerializerTest method serializeStyle_resultJsonHasStyle.
@Test
public void serializeStyle_resultJsonHasStyle() throws IOException {
// given
UniqueEntriesHighlighter highlighter = (UniqueEntriesHighlighter) TableDisplayCellHighlighter.getUniqueEntriesHighlighter("a", HighlightStyle.SINGLE_COLUMN);
// when
JsonNode actualObj = serializeHighliter(highlighter);
// then
Assertions.assertThat(actualObj.has("style")).isTrue();
Assertions.assertThat(actualObj.get("style").asText()).isEqualTo("SINGLE_COLUMN");
}
Aggregations