diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-06-19 12:23:33 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-06-19 12:23:33 +0300 |
commit | 26ba3f922fbb01daa35b6f97039335892b896d36 (patch) | |
tree | 27c59aa81c565efa7b33211f57a346ec662abd23 /tests/server-side | |
parent | 6750c529283be82e4f868ca6f389927e577189cf (diff) | |
download | vaadin-framework-26ba3f922fbb01daa35b6f97039335892b896d36.tar.gz vaadin-framework-26ba3f922fbb01daa35b6f97039335892b896d36.zip |
Extract API from Root to Page (#8907)
Diffstat (limited to 'tests/server-side')
-rw-r--r-- | tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java | 6 | ||||
-rw-r--r-- | tests/server-side/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java b/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java index ab983b4022..03f49d4ab6 100644 --- a/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java +++ b/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java @@ -19,9 +19,9 @@ import com.vaadin.navigator.ViewChangeListener; import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; import com.vaadin.navigator.ViewDisplay; import com.vaadin.navigator.ViewProvider; +import com.vaadin.terminal.Page; import com.vaadin.tests.server.navigator.ClassBasedViewProviderTest.TestView; import com.vaadin.tests.server.navigator.ClassBasedViewProviderTest.TestView2; -import com.vaadin.ui.Root; public class NavigatorTest extends TestCase { @@ -366,9 +366,9 @@ public class NavigatorTest extends TestCase { public void testDefaultDisplayType() { IMocksControl control = EasyMock.createControl(); - Root root = control.createMock(Root.class); + Page page = control.createMock(Page.class); - Navigator navigator = new Navigator(root); + Navigator navigator = new Navigator(page); assertEquals("Default display should be a SimpleViewDisplay", SimpleViewDisplay.class, navigator.getDisplay().getClass()); diff --git a/tests/server-side/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java b/tests/server-side/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java index cfbf50f256..65294b2913 100644 --- a/tests/server-side/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java +++ b/tests/server-side/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java @@ -11,20 +11,20 @@ import org.easymock.IMocksControl; import com.vaadin.navigator.Navigator; import com.vaadin.navigator.Navigator.UriFragmentManager; -import com.vaadin.ui.Root; -import com.vaadin.ui.Root.FragmentChangedEvent; +import com.vaadin.terminal.Page; +import com.vaadin.terminal.Page.FragmentChangedEvent; public class UriFragmentManagerTest extends TestCase { public void testGetSetFragment() { - Root root = EasyMock.createMock(Root.class); - UriFragmentManager manager = new UriFragmentManager(root, null); + Page page = EasyMock.createMock(Page.class); + UriFragmentManager manager = new UriFragmentManager(page, null); // prepare mock - EasyMock.expect(root.getFragment()).andReturn(""); - root.setFragment("test"); - EasyMock.expect(root.getFragment()).andReturn("test"); - EasyMock.replay(root); + EasyMock.expect(page.getFragment()).andReturn(""); + page.setFragment("test"); + EasyMock.expect(page.getFragment()).andReturn("test"); + EasyMock.replay(page); // test manager using the mock assertEquals("Incorrect fragment value", "", manager.getFragment()); @@ -36,15 +36,15 @@ public class UriFragmentManagerTest extends TestCase { // create mocks IMocksControl control = EasyMock.createControl(); Navigator navigator = control.createMock(Navigator.class); - Root root = control.createMock(Root.class); + Page page = control.createMock(Page.class); - UriFragmentManager manager = new UriFragmentManager(root, navigator); + UriFragmentManager manager = new UriFragmentManager(page, navigator); - EasyMock.expect(root.getFragment()).andReturn("test"); + EasyMock.expect(page.getFragment()).andReturn("test"); navigator.navigateTo("test"); control.replay(); - FragmentChangedEvent event = root.new FragmentChangedEvent(root, + FragmentChangedEvent event = page.new FragmentChangedEvent(page, "oldtest"); manager.fragmentChanged(event); } |