Search in sources :

Example 16 with EmailField

use of com.vaadin.flow.component.textfield.EmailField in project flow-components by vaadin.

the class EmailFieldTest method setValueNull.

@Test
public void setValueNull() {
    EmailField emailField = new EmailField();
    assertEquals("Value should be an empty string", "", emailField.getValue());
    thrown.expect(NullPointerException.class);
    thrown.expectMessage("Null value is not supported");
    emailField.setValue(null);
}
Also used : EmailField(com.vaadin.flow.component.textfield.EmailField) Test(org.junit.Test)

Example 17 with EmailField

use of com.vaadin.flow.component.textfield.EmailField in project flow-components by vaadin.

the class HasLabelTest method emailField.

@Test
public void emailField() {
    EmailField c = new EmailField();
    Assert.assertTrue(c instanceof HasLabel);
}
Also used : HasLabel(com.vaadin.flow.component.HasLabel) EmailField(com.vaadin.flow.component.textfield.EmailField) Test(org.junit.Test)

Aggregations

EmailField (com.vaadin.flow.component.textfield.EmailField)17 TextField (com.vaadin.flow.component.textfield.TextField)14 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)10 Person (com.vaadin.demo.domain.Person)9 BinderCrudEditor (com.vaadin.flow.component.crud.BinderCrudEditor)9 Binder (com.vaadin.flow.data.binder.Binder)9 TextArea (com.vaadin.flow.component.textfield.TextArea)3 Test (org.junit.Test)3 Button (com.vaadin.flow.component.button.Button)2 Div (com.vaadin.flow.component.html.Div)2 PasswordField (com.vaadin.flow.component.textfield.PasswordField)2 EmailValidator (com.vaadin.flow.data.validator.EmailValidator)2 StringLengthValidator (com.vaadin.flow.data.validator.StringLengthValidator)2 AuthService (com.example.application.data.services.AuthService)1 MainLayout (com.example.application.views.MainLayout)1 Component (com.vaadin.flow.component.Component)1 Composite (com.vaadin.flow.component.Composite)1 HasLabel (com.vaadin.flow.component.HasLabel)1 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)1 ComboBox (com.vaadin.flow.component.combobox.ComboBox)1