use of com.vaadin.flow.dom.impl.BasicElementStateProvider in project flow by vaadin.
the class BasicElementStateProviderTest method supportsSelfCreatedNode.
@Test
public void supportsSelfCreatedNode() {
BasicElementStateProvider provider = BasicElementStateProvider.get();
StateNode node = BasicElementStateProvider.createStateNode("foo");
Assert.assertTrue(provider.supports(node));
}
use of com.vaadin.flow.dom.impl.BasicElementStateProvider in project flow by vaadin.
the class BasicElementStateProviderTest method doesNotSupportEmptyNode.
@Test
public void doesNotSupportEmptyNode() {
BasicElementStateProvider provider = BasicElementStateProvider.get();
Assert.assertFalse(provider.supports(new StateNode()));
}
use of com.vaadin.flow.dom.impl.BasicElementStateProvider in project flow by vaadin.
the class BasicElementStateProviderTest method supportsUIRootNode.
@Test
public void supportsUIRootNode() {
BasicElementStateProvider provider = BasicElementStateProvider.get();
UI ui = new UI() {
@Override
protected void init(VaadinRequest request) {
}
};
StateNode rootNode = ui.getInternals().getStateTree().getRootNode();
Assert.assertTrue(provider.supports(rootNode));
}
Aggregations