diff options
Diffstat (limited to 'server/tests/src/com/vaadin/ui/NativeSelectTest.java')
-rw-r--r-- | server/tests/src/com/vaadin/ui/NativeSelectTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/ui/NativeSelectTest.java b/server/tests/src/com/vaadin/ui/NativeSelectTest.java index 7e2a04ef1c..78e4715f9b 100644 --- a/server/tests/src/com/vaadin/ui/NativeSelectTest.java +++ b/server/tests/src/com/vaadin/ui/NativeSelectTest.java @@ -21,6 +21,7 @@ import org.junit.Assert; import org.junit.Test; import com.vaadin.data.util.IndexedContainer; +import com.vaadin.shared.ui.select.AbstractSelectState; public class NativeSelectTest { @@ -45,6 +46,21 @@ public class NativeSelectTest { assertFocusRpcRegistered(new NativeSelect("foo", new IndexedContainer())); } + @Test + public void getState_listSelectHasCustomState() { + TestNativeSelect select = new TestNativeSelect(); + AbstractSelectState state = select.getState(); + Assert.assertEquals("Unexpected state class", + AbstractSelectState.class, state.getClass()); + } + + private static class TestNativeSelect extends NativeSelect { + @Override + public AbstractSelectState getState() { + return super.getState(); + } + } + private void assertFocusRpcRegistered(NativeSelect s) { Assert.assertNotNull( "RPC is not correctly registered", |