use of com.vaadin.flow.template.angular.model.TemplateModelTest.EmptyModelTemplate in project flow by vaadin.
the class TemplateModelProxyHandlerTest method nonStaticNestedClass_throwsException.
@Test(expected = IllegalArgumentException.class)
public void nonStaticNestedClass_throwsException() {
EmptyModelTemplate template = new EmptyModelTemplate();
TemplateModelProxyHandler.createModelProxy(template.getElement().getNode(), new BeanModelType<>(NotStaticModel.class, PropertyFilter.ACCEPT_ALL));
}
use of com.vaadin.flow.template.angular.model.TemplateModelTest.EmptyModelTemplate in project flow by vaadin.
the class TemplateModelProxyHandlerTest method testToString.
@Test
public void testToString() {
EmptyModelTemplate emptyModelTemplate1 = new EmptyModelTemplate();
EmptyModelTemplate emptyModelTemplate2 = new EmptyModelTemplate();
TemplateModel m1 = emptyModelTemplate1.getModel();
TemplateModel m2 = emptyModelTemplate2.getModel();
// add templates to UI so that their state nodes get an id which is used
// in toString()
new UI().add(emptyModelTemplate1, emptyModelTemplate2);
Assert.assertEquals(m1.toString(), m1.toString());
Assert.assertNotEquals(m1.toString(), m2.toString());
}
Aggregations