diff options
author | Denis Anisimov <denis@vaadin.com> | 2015-09-24 11:53:58 +0300 |
---|---|---|
committer | Denis Anisimov <denis@vaadin.com> | 2015-10-16 09:58:35 +0300 |
commit | bf030a07b0614c9782dd02669900529175069c15 (patch) | |
tree | 7609ceaac9d81f8994e7fa32f6d263a1e654f7b6 /server/tests/src/com/vaadin/ui | |
parent | 5b4906440b4113674b5c7cd88be68c0581bc564e (diff) | |
download | vaadin-framework-bf030a07b0614c9782dd02669900529175069c15.tar.gz vaadin-framework-bf030a07b0614c9782dd02669900529175069c15.zip |
Provide own states for a number of components (#18987).
Change-Id: I9fe4a332bb8170a6482610d1b83bad73e049a3a1
Diffstat (limited to 'server/tests/src/com/vaadin/ui')
-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", |