Search in sources :

Example 26 with TestComponent

use of com.vaadin.flow.component.ComponentTest.TestComponent in project flow by vaadin.

the class ComponentEventBusTest method multipleEventDataConstructors_addListener.

@Test(expected = IllegalArgumentException.class)
public void multipleEventDataConstructors_addListener() {
    TestComponent c = new TestComponent();
    c.addListener(MappedToDomEventMultipleConstructors.class, e -> {
    });
}
Also used : TestComponent(com.vaadin.flow.component.ComponentTest.TestComponent) Test(org.junit.Test)

Example 27 with TestComponent

use of com.vaadin.flow.component.ComponentTest.TestComponent in project flow by vaadin.

the class CompositeNestedTest method setup.

@Before
public void setup() {
    layout = new TestLayout();
    componentInComposite = new TestComponent(ElementFactory.createDiv("Inside composite"));
    compositeInner = new TestComposite(componentInComposite) {

        @Override
        public String toString() {
            return "compositeInner";
        }
    };
    compositeOuter = new TestComposite(compositeInner) {

        @Override
        public String toString() {
            return "compositeOuter";
        }
    };
    layout.addComponent(compositeOuter);
}
Also used : TestComponent(com.vaadin.flow.component.ComponentTest.TestComponent) Before(org.junit.Before)

Aggregations

TestComponent (com.vaadin.flow.component.ComponentTest.TestComponent)27 Test (org.junit.Test)26 JsonObject (elemental.json.JsonObject)11 UI (com.vaadin.flow.component.UI)6 Element (com.vaadin.flow.dom.Element)6 Registration (com.vaadin.flow.shared.Registration)4 StateNode (com.vaadin.flow.internal.StateNode)3 ElementPropertyMap (com.vaadin.flow.internal.nodefeature.ElementPropertyMap)3 Serializable (java.io.Serializable)3 BigDecimal (java.math.BigDecimal)3 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 TemplateElementStateProviderTest (com.vaadin.flow.dom.TemplateElementStateProviderTest)2 ModelList (com.vaadin.flow.internal.nodefeature.ModelList)1 JsonValue (elemental.json.JsonValue)1 Before (org.junit.Before)1