summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-03-15 15:09:32 +0200
committerVaadin Code Review <review@vaadin.com>2015-06-08 08:32:16 +0000
commit3a42436fc9ce52e9689adf7166a9c5698224ec40 (patch)
tree62bfb4c433c6bd7c61b486424994c81c15a2bc4f /server/tests
parent5ae33b641eea02b647825b27c311d4116f3be838 (diff)
downloadvaadin-framework-3a42436fc9ce52e9689adf7166a9c5698224ec40.tar.gz
vaadin-framework-3a42436fc9ce52e9689adf7166a9c5698224ec40.zip
Don't allow null view providers (#17028)
Change-Id: I5ce4885f19aaac2d4454b5a368f3e58453cf76f9
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java
index ff6028648e..2c045d53fa 100644
--- a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java
+++ b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java
@@ -712,4 +712,21 @@ public class NavigatorTest extends TestCase {
navigator.addView("view", view);
navigator.navigateTo("view");
}
+
+ public void testNullViewProvider() {
+ IMocksControl control = EasyMock.createControl();
+ NavigationStateManager manager = control
+ .createMock(NavigationStateManager.class);
+ ViewDisplay display = control.createMock(ViewDisplay.class);
+
+ // create navigator to test
+ Navigator navigator = createNavigator(manager, display);
+
+ try {
+ navigator.addProvider(null);
+ fail("Should not be allowed to add a null view provider");
+ } catch (IllegalArgumentException e) {
+ // Expected
+ }
+ }
}