diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-16 18:29:44 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-11-16 18:29:44 +0200 |
commit | 9a3a22cc9f8f95054e3528b0ffcc0b9e92cffbea (patch) | |
tree | 9f2c7302f294ffe8c02915b1d7f286733f815817 /server/tests | |
parent | 15f833480da7a5eff0d29c527cd956b9e9658401 (diff) | |
download | vaadin-framework-9a3a22cc9f8f95054e3528b0ffcc0b9e92cffbea.tar.gz vaadin-framework-9a3a22cc9f8f95054e3528b0ffcc0b9e92cffbea.zip |
Renamed VaadinServiceSession to VaadinSession (#10223)
Change-Id: Id7f367300c000aa47edc12084f4e9500502466c3
Diffstat (limited to 'server/tests')
11 files changed, 44 insertions, 44 deletions
diff --git a/server/tests/src/com/vaadin/tests/VaadinClasses.java b/server/tests/src/com/vaadin/tests/VaadinClasses.java index b0d06ea897..e88786432c 100644 --- a/server/tests/src/com/vaadin/tests/VaadinClasses.java +++ b/server/tests/src/com/vaadin/tests/VaadinClasses.java @@ -17,7 +17,7 @@ import java.util.jar.JarEntry; import org.junit.Test; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Component; import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.CustomComponent; @@ -144,7 +144,7 @@ public class VaadinClasses { String basePackage, String[] ignoredPackages) throws IOException { List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>(); String basePackageDirName = "/" + basePackage.replace('.', '/'); - URL location = VaadinServiceSession.class + URL location = VaadinSession.class .getResource(basePackageDirName); if (location.getProtocol().equals("file")) { try { diff --git a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java index 0ba7779e79..e074b60f73 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java +++ b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java @@ -21,7 +21,7 @@ import junit.framework.TestCase; import com.vaadin.data.util.converter.Converter; import com.vaadin.data.util.converter.DefaultConverterFactory; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.TextField; public class ConverterFactory extends TestCase { @@ -65,15 +65,15 @@ public class ConverterFactory extends TestCase { } public void testApplicationConverterFactoryInBackgroundThread() { - VaadinServiceSession.setCurrent(null); - final VaadinServiceSession appWithCustomIntegerConverter = new VaadinServiceSession( + VaadinSession.setCurrent(null); + final VaadinSession appWithCustomIntegerConverter = new VaadinSession( null); appWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); TextField tf = new TextField("", "123") { @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return appWithCustomIntegerConverter; }; }; @@ -84,11 +84,11 @@ public class ConverterFactory extends TestCase { } public void testApplicationConverterFactoryForDetachedComponent() { - final VaadinServiceSession appWithCustomIntegerConverter = new VaadinServiceSession( + final VaadinSession appWithCustomIntegerConverter = new VaadinSession( null); appWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); - VaadinServiceSession.setCurrent(appWithCustomIntegerConverter); + VaadinSession.setCurrent(appWithCustomIntegerConverter); TextField tf = new TextField("", "123"); tf.setConverter(Integer.class); @@ -98,15 +98,15 @@ public class ConverterFactory extends TestCase { } public void testApplicationConverterFactoryForDifferentThanCurrentApplication() { - final VaadinServiceSession fieldAppWithCustomIntegerConverter = new VaadinServiceSession( + final VaadinSession fieldAppWithCustomIntegerConverter = new VaadinSession( null); fieldAppWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); - VaadinServiceSession.setCurrent(new VaadinServiceSession(null)); + VaadinSession.setCurrent(new VaadinSession(null)); TextField tf = new TextField("", "123") { @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return fieldAppWithCustomIntegerConverter; } }; diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java index 5c74077ca9..f8dceca363 100644 --- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java +++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java @@ -7,7 +7,7 @@ import org.easymock.EasyMock; import com.vaadin.server.CommunicationManager; import com.vaadin.server.StreamVariable; import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.UI; import com.vaadin.ui.Upload; @@ -21,7 +21,7 @@ public class TestStreamVariableMapping extends TestCase { @Override protected void setUp() throws Exception { - final VaadinServiceSession application = new VaadinServiceSession(null); + final VaadinSession application = new VaadinSession(null); final UI uI = new UI() { @Override protected void init(VaadinRequest request) { @@ -30,7 +30,7 @@ public class TestStreamVariableMapping extends TestCase { } @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return application; } }; @@ -66,7 +66,7 @@ public class TestStreamVariableMapping extends TestCase { } private CommunicationManager createCommunicationManager() { - return new CommunicationManager(new VaadinServiceSession(null)); + return new CommunicationManager(new VaadinSession(null)); } } diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java index 83224861b6..16c7c4060d 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java @@ -12,7 +12,7 @@ import com.vaadin.data.util.ObjectProperty; import com.vaadin.data.util.converter.Converter; import com.vaadin.data.util.converter.Converter.ConversionException; import com.vaadin.data.util.converter.StringToIntegerConverter; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; @@ -157,11 +157,11 @@ public class AbstractFieldValueConversions extends TestCase { } public void testNumberDoubleConverterChange() { - final VaadinServiceSession a = new VaadinServiceSession(null); - VaadinServiceSession.setCurrent(a); + final VaadinSession a = new VaadinSession(null); + VaadinSession.setCurrent(a); TextField tf = new TextField() { @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return a; } }; diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java index 43a7d90922..9338d74f05 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java @@ -6,7 +6,7 @@ import java.util.Locale; import junit.framework.TestCase; import com.vaadin.data.util.MethodProperty; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; @@ -26,8 +26,8 @@ public class DefaultConverterFactory extends TestCase { } public void testDefaultNumberConversion() { - VaadinServiceSession app = new VaadinServiceSession(null); - VaadinServiceSession.setCurrent(app); + VaadinSession app = new VaadinSession(null); + VaadinSession.setCurrent(app); TextField tf = new TextField(); tf.setLocale(new Locale("en", "US")); tf.setPropertyDataSource(new MethodProperty<Integer>(paulaBean, diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index e81f4ac6f7..577275b4d9 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -8,7 +8,7 @@ import com.vaadin.data.Property; import com.vaadin.data.util.AbstractProperty; import com.vaadin.data.util.converter.Converter.ConversionException; import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.AbstractField; import com.vaadin.ui.UI; @@ -18,7 +18,7 @@ public class RemoveListenersOnDetach { int numReadOnlyChanges = 0; AbstractField field = new AbstractField() { - final private VaadinServiceSession application = new VaadinServiceSession( + final private VaadinSession application = new VaadinSession( null); private UI uI = new UI() { @@ -28,7 +28,7 @@ public class RemoveListenersOnDetach { } @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return application; } @@ -58,7 +58,7 @@ public class RemoveListenersOnDetach { }; @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return application; }; }; diff --git a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java b/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java index 68e983f8a5..5a27a192c2 100644 --- a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java +++ b/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java @@ -19,7 +19,7 @@ import junit.framework.TestCase; import com.vaadin.data.Property; import com.vaadin.data.util.MethodProperty; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Person; import com.vaadin.ui.Label; @@ -37,7 +37,7 @@ public class LabelConverters extends TestCase { } public void testIntegerDataSource() { - VaadinServiceSession.setCurrent(new VaadinServiceSession(null)); + VaadinSession.setCurrent(new VaadinSession(null)); Label l = new Label("Foo"); Property ds = new MethodProperty<Integer>(Person.createTestPerson1(), "age"); diff --git a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java index 71749ed964..e02fafeaff 100644 --- a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java +++ b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java @@ -14,7 +14,7 @@ import com.vaadin.server.DeploymentConfiguration; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinService; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.UI; public class CustomUIClassLoader extends TestCase { @@ -53,7 +53,7 @@ public class CustomUIClassLoader extends TestCase { * if thrown */ public void testWithNullClassLoader() throws Exception { - VaadinServiceSession application = createStubApplication(); + VaadinSession application = createStubApplication(); application.setConfiguration(createConfigurationMock()); DefaultUIProvider uiProvider = new DefaultUIProvider(); @@ -65,7 +65,7 @@ public class CustomUIClassLoader extends TestCase { private static DeploymentConfiguration createConfigurationMock() { Properties properties = new Properties(); - properties.put(VaadinServiceSession.UI_PARAMETER, MyUI.class.getName()); + properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName()); return new DefaultDeploymentConfiguration(CustomUIClassLoader.class, properties); } @@ -111,8 +111,8 @@ public class CustomUIClassLoader extends TestCase { } - private VaadinServiceSession createStubApplication() { - return new VaadinServiceSession(null) { + private VaadinSession createStubApplication() { + return new VaadinSession(null) { @Override public DeploymentConfiguration getConfiguration() { return createConfigurationMock(); diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java index 031b332ee7..bf6d127a83 100644 --- a/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java +++ b/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java @@ -7,7 +7,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import com.vaadin.server.LegacyApplication; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.UI; import com.vaadin.ui.Window; @@ -25,7 +25,7 @@ public class AddRemoveSubWindow { @Test public void addSubWindow() { - VaadinServiceSession.setCurrent(new VaadinServiceSession(null)); + VaadinSession.setCurrent(new VaadinSession(null)); TestApp app = new TestApp(); app.init(); Window subWindow = new Window("Sub window"); diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java index a00e5e0996..63a58bcab3 100644 --- a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java +++ b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java @@ -7,7 +7,7 @@ import org.junit.Test; import com.vaadin.server.ClientConnector; import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Label; import com.vaadin.ui.UI; import com.vaadin.ui.VerticalLayout; @@ -15,7 +15,7 @@ import com.vaadin.ui.Window; public class AttachDetachWindow { - private VaadinServiceSession testApp = new VaadinServiceSession(null); + private VaadinSession testApp = new VaadinSession(null); private interface TestContainer { public boolean attachCalled(); @@ -24,7 +24,7 @@ public class AttachDetachWindow { public TestContent getTestContent(); - public VaadinServiceSession getSession(); + public VaadinSession getSession(); } private class TestWindow extends Window implements TestContainer { @@ -64,7 +64,7 @@ public class AttachDetachWindow { } @Override - public VaadinServiceSession getSession() { + public VaadinSession getSession() { return super.getSession(); } } @@ -243,7 +243,7 @@ public class AttachDetachWindow { getSession(win.getTestContent().child), null); } - private VaadinServiceSession getSession(ClientConnector testContainer) { + private VaadinSession getSession(ClientConnector testContainer) { UI ui = testContainer.getUI(); if (ui != null) { return ui.getSession(); diff --git a/server/tests/src/com/vaadin/ui/LabelDataSource.java b/server/tests/src/com/vaadin/ui/LabelDataSource.java index 7ef8d67c2a..4240735f63 100644 --- a/server/tests/src/com/vaadin/ui/LabelDataSource.java +++ b/server/tests/src/com/vaadin/ui/LabelDataSource.java @@ -23,7 +23,7 @@ import org.junit.Test; import com.vaadin.data.util.ObjectProperty; import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinServiceSession; +import com.vaadin.server.VaadinSession; public class LabelDataSource { @@ -35,12 +35,12 @@ public class LabelDataSource { private static final Object INTEGER_STRING_VALUE_DE = "1.587"; ObjectProperty<String> stringDataSource; private ObjectProperty<Integer> integerDataSource; - VaadinServiceSession vaadinSession; + VaadinSession vaadinSession; @Before public void setup() { - vaadinSession = new VaadinServiceSession(null); - VaadinServiceSession.setCurrent(vaadinSession); + vaadinSession = new VaadinSession(null); + VaadinSession.setCurrent(vaadinSession); label = new Label(); stringDataSource = new ObjectProperty<String>(STRING_DS_VALUE); |