use of com.vaadin.addon.charts.model.DataLabels in project charts by vaadin.
the class LabelsJSONSerializationTest method toJSON_allowOverlapIsSet_labelsSerializedWithAllowOverlap.
@Test
public void toJSON_allowOverlapIsSet_labelsSerializedWithAllowOverlap() throws IOException {
DataLabels labels = new DataLabels(true);
labels.setAllowOverlap(true);
ObjectMapper om = ChartSerialization.createObjectMapper();
String json = toJSON(labels);
DataLabels fromJson = om.readValue(json, DataLabels.class);
assertEquals(true, fromJson.getAllowOverlap());
}
Aggregations