Change-Id: Iebf44d7bff598248fe1cda138ac1d8b4100775batags/7.1.0
@@ -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" /> |
@@ -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 { |
@@ -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)); | |||
} |
@@ -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() { | |||