summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common.xml1
-rw-r--r--server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java13
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java7
-rw-r--r--server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java3
4 files changed, 8 insertions, 16 deletions
diff --git a/common.xml b/common.xml
index e46cefd895..f00d4c8baf 100644
--- a/common.xml
+++ b/common.xml
@@ -363,6 +363,7 @@
<batchtest fork="yes">
<fileset dir="${test.src}">
<exclude name="**/Abstract*" />
+ <exclude name="**/Mock*" />
<exclude name="com/vaadin/tests/data/bean/*" />
<exclude name="com/vaadin/tests/util/*" />
<exclude name="**/VaadinClasses.java" />
diff --git a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
index 2a83f5d5b2..3f940ae0a7 100644
--- a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
+++ b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
@@ -4,10 +4,8 @@ import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
-import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
@@ -24,16 +22,7 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase
super.setUp();
servlet = new VaadinServlet();
-
- // Workaround to avoid calling init and creating servlet config
- Field f = VaadinServlet.class.getDeclaredField("servletService");
- f.setAccessible(true);
- VaadinServletService service = new VaadinServletService(servlet,
- new DefaultDeploymentConfiguration(servlet.getClass(),
- new Properties()));
- service.init();
- f.set(servlet, service);
-
+ servlet.init(new MockServletConfig());
}
public void testWidgetSetLocation() throws Exception {
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
index bee932a29f..fcc54a989d 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -5,6 +5,7 @@ import junit.framework.TestCase;
import org.easymock.EasyMock;
import com.vaadin.server.LegacyCommunicationManager;
+import com.vaadin.server.MockServletConfig;
import com.vaadin.server.StreamVariable;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
@@ -78,10 +79,10 @@ public class TestStreamVariableMapping extends TestCase {
private LegacyCommunicationManager createCommunicationManager()
throws Exception {
- VaadinServletService vss = new VaadinServletService(
- EasyMock.createMock(VaadinServlet.class),
+ VaadinServlet servlet = new VaadinServlet();
+ VaadinServletService vss = new VaadinServletService(servlet,
new MockDeploymentConfiguration());
- vss.init();
+ servlet.init(new MockServletConfig());
return new LegacyCommunicationManager(
new AlwaysLockedVaadinSession(vss));
}
diff --git a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java
index acea0a84c7..55d5771f80 100644
--- a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java
+++ b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java
@@ -11,6 +11,7 @@ import org.junit.Test;
import com.vaadin.data.util.converter.StringToIntegerConverter;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
+import com.vaadin.tests.util.AlwaysLockedVaadinSession;
public class AbsFieldDataSourceLocaleChange {
@@ -19,7 +20,7 @@ public class AbsFieldDataSourceLocaleChange {
@Before
public void setup() {
- vaadinSession = new VaadinSession(null);
+ vaadinSession = new AlwaysLockedVaadinSession(null);
VaadinSession.setCurrent(vaadinSession);
ui = new UI() {