summaryrefslogtreecommitdiffstats
path: root/server/tests/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/src/com')
-rw-r--r--server/tests/src/com/vaadin/tests/VaadinClasses.java5
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java18
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java14
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java10
-rw-r--r--server/tests/src/com/vaadin/ui/LabelDataSource.java8
11 files changed, 47 insertions, 46 deletions
diff --git a/server/tests/src/com/vaadin/tests/VaadinClasses.java b/server/tests/src/com/vaadin/tests/VaadinClasses.java
index 198d41668c..c0e026a5ca 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
import com.vaadin.ui.Component;
import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.CustomComponent;
@@ -144,7 +144,8 @@ 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 = VaadinSession.class.getResource(basePackageDirName);
+ URL location = VaadinServiceSession.class
+ .getResource(basePackageDirName);
if (location.getProtocol().equals("file")) {
try {
File f = new File(location.toURI());
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 b64514ea14..72747dca2d 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
import com.vaadin.ui.TextField;
public class ConverterFactory extends TestCase {
@@ -65,14 +65,14 @@ public class ConverterFactory extends TestCase {
}
public void testApplicationConverterFactoryInBackgroundThread() {
- VaadinSession.setCurrent(null);
- final VaadinSession appWithCustomIntegerConverter = new VaadinSession();
+ VaadinServiceSession.setCurrent(null);
+ final VaadinServiceSession appWithCustomIntegerConverter = new VaadinServiceSession();
appWithCustomIntegerConverter
.setConverterFactory(new ConverterFactory42());
TextField tf = new TextField("", "123") {
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession getSession() {
return appWithCustomIntegerConverter;
};
};
@@ -83,10 +83,10 @@ public class ConverterFactory extends TestCase {
}
public void testApplicationConverterFactoryForDetachedComponent() {
- final VaadinSession appWithCustomIntegerConverter = new VaadinSession();
+ final VaadinServiceSession appWithCustomIntegerConverter = new VaadinServiceSession();
appWithCustomIntegerConverter
.setConverterFactory(new ConverterFactory42());
- VaadinSession.setCurrent(appWithCustomIntegerConverter);
+ VaadinServiceSession.setCurrent(appWithCustomIntegerConverter);
TextField tf = new TextField("", "123");
tf.setConverter(Integer.class);
@@ -96,14 +96,14 @@ public class ConverterFactory extends TestCase {
}
public void testApplicationConverterFactoryForDifferentThanCurrentApplication() {
- final VaadinSession fieldAppWithCustomIntegerConverter = new VaadinSession();
+ final VaadinServiceSession fieldAppWithCustomIntegerConverter = new VaadinServiceSession();
fieldAppWithCustomIntegerConverter
.setConverterFactory(new ConverterFactory42());
- VaadinSession.setCurrent(new VaadinSession());
+ VaadinServiceSession.setCurrent(new VaadinServiceSession());
TextField tf = new TextField("", "123") {
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession 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 5078dd2f66..0130086371 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
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 VaadinSession application = new VaadinSession();
+ final VaadinServiceSession application = new VaadinServiceSession();
final UI uI = new UI() {
@Override
protected void init(VaadinRequest request) {
@@ -30,7 +30,7 @@ public class TestStreamVariableMapping extends TestCase {
}
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession getSession() {
return application;
}
};
@@ -66,7 +66,7 @@ public class TestStreamVariableMapping extends TestCase {
}
private CommunicationManager createCommunicationManager() {
- return new CommunicationManager(new VaadinSession());
+ return new CommunicationManager(new VaadinServiceSession());
}
}
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 b48ad62bcc..faec1d99a1 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
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.MethodProperty;
import com.vaadin.data.util.converter.Converter;
import com.vaadin.data.util.converter.StringToIntegerConverter;
-import com.vaadin.server.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
import com.vaadin.tests.data.bean.Address;
import com.vaadin.tests.data.bean.Country;
import com.vaadin.tests.data.bean.Person;
@@ -186,11 +186,11 @@ public class AbstractFieldValueConversions extends TestCase {
}
public void testNumberDoubleConverterChange() {
- final VaadinSession a = new VaadinSession();
- VaadinSession.setCurrent(a);
+ final VaadinServiceSession a = new VaadinServiceSession();
+ VaadinServiceSession.setCurrent(a);
TextField tf = new TextField() {
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession 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 a1b6541ee0..b29876ef3c 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
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() {
- VaadinSession app = new VaadinSession();
- VaadinSession.setCurrent(app);
+ VaadinServiceSession app = new VaadinServiceSession();
+ VaadinServiceSession.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 462eec2239..bfa79ec9c8 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
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 VaadinSession application = new VaadinSession() {
+ final private VaadinServiceSession application = new VaadinServiceSession() {
};
private UI uI = new UI() {
@@ -29,7 +29,7 @@ public class RemoveListenersOnDetach {
}
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession getSession() {
return application;
}
@@ -59,7 +59,7 @@ public class RemoveListenersOnDetach {
};
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession 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 22cd450af7..37363e7d4b 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
import com.vaadin.tests.data.bean.Person;
import com.vaadin.ui.Label;
@@ -37,7 +37,7 @@ public class LabelConverters extends TestCase {
}
public void testIntegerDataSource() {
- VaadinSession.setCurrent(new VaadinSession());
+ VaadinServiceSession.setCurrent(new VaadinServiceSession());
Label l = new Label("Foo");
Property ds = new MethodProperty<Integer>(Person.createTestPerson1(),
"age");
diff --git a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
index 40ee6604f6..161165cf64 100644
--- a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
+++ b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
@@ -14,8 +14,8 @@ import com.vaadin.server.DeploymentConfiguration;
import com.vaadin.server.UIClassSelectionEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinService;
-import com.vaadin.server.VaadinSession;
-import com.vaadin.server.VaadinSession.SessionStartEvent;
+import com.vaadin.server.VaadinServiceSession;
+import com.vaadin.server.VaadinServiceSession.SessionStartEvent;
import com.vaadin.ui.UI;
public class CustomUIClassLoader extends TestCase {
@@ -54,7 +54,7 @@ public class CustomUIClassLoader extends TestCase {
* if thrown
*/
public void testWithNullClassLoader() throws Exception {
- VaadinSession application = createStubApplication();
+ VaadinServiceSession application = createStubApplication();
application.start(new SessionStartEvent(null,
createConfigurationMock(), null));
@@ -67,7 +67,7 @@ public class CustomUIClassLoader extends TestCase {
private static DeploymentConfiguration createConfigurationMock() {
Properties properties = new Properties();
- properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName());
+ properties.put(VaadinServiceSession.UI_PARAMETER, MyUI.class.getName());
return new DefaultDeploymentConfiguration(CustomUIClassLoader.class,
properties);
}
@@ -97,7 +97,7 @@ public class CustomUIClassLoader extends TestCase {
public void testWithClassLoader() throws Exception {
LoggingClassLoader loggingClassLoader = new LoggingClassLoader();
- VaadinSession application = createStubApplication();
+ VaadinServiceSession application = createStubApplication();
application.start(new SessionStartEvent(null,
createConfigurationMock(), null));
@@ -112,8 +112,8 @@ public class CustomUIClassLoader extends TestCase {
}
- private VaadinSession createStubApplication() {
- return new VaadinSession() {
+ private VaadinServiceSession createStubApplication() {
+ return new VaadinServiceSession() {
@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 679c288586..19cf69422f 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.LegacyApplication;
-import com.vaadin.server.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
import com.vaadin.ui.UI;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Window;
@@ -25,7 +25,7 @@ public class AddRemoveSubWindow {
@Test
public void addSubWindow() {
- VaadinSession.setCurrent(new VaadinSession());
+ VaadinServiceSession.setCurrent(new VaadinServiceSession());
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 3eebc7cdf8..5374641bea 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
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 VaadinSession testApp = new VaadinSession();
+ private VaadinServiceSession testApp = new VaadinServiceSession();
private interface TestContainer {
public boolean attachCalled();
@@ -24,7 +24,7 @@ public class AttachDetachWindow {
public TestContent getTestContent();
- public VaadinSession getSession();
+ public VaadinServiceSession getSession();
}
private class TestWindow extends Window implements TestContainer {
@@ -64,7 +64,7 @@ public class AttachDetachWindow {
}
@Override
- public VaadinSession getSession() {
+ public VaadinServiceSession getSession() {
return super.getSession();
}
}
@@ -243,7 +243,7 @@ public class AttachDetachWindow {
getSession(win.getTestContent().child), null);
}
- private VaadinSession getSession(ClientConnector testContainer) {
+ private VaadinServiceSession 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 fa21fbefc3..30295553a2 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.VaadinSession;
+import com.vaadin.server.VaadinServiceSession;
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;
- VaadinSession vaadinSession;
+ VaadinServiceSession vaadinSession;
@Before
public void setup() {
- vaadinSession = new VaadinSession();
- VaadinSession.setCurrent(vaadinSession);
+ vaadinSession = new VaadinServiceSession();
+ VaadinServiceSession.setCurrent(vaadinSession);
label = new Label();
stringDataSource = new ObjectProperty<String>(STRING_DS_VALUE);