use of com.vaadin.flow.dom.Style in project flow by vaadin.
the class ElementTest method nullStyleValue.
@Test
public void nullStyleValue() {
Element element = ElementFactory.createDiv();
Style style = element.getStyle();
style.set("borderColor", "blue");
style.set("borderColor", null);
List<String> styles = style.getNames().collect(Collectors.toList());
Assert.assertFalse(styles.contains("borderColor"));
}
use of com.vaadin.flow.dom.Style in project flow by vaadin.
the class ElementTest method getNullStyle.
@Test(expected = IllegalArgumentException.class)
public void getNullStyle() {
Element e = ElementFactory.createDiv();
Style s = e.getStyle();
s.get(null);
}
Aggregations