You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/07/03 13:18:37 UTC

svn commit: r1142416 - /wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java

Author: mgrigorov
Date: Sun Jul  3 11:18:37 2011
New Revision: 1142416

URL: http://svn.apache.org/viewvc?rev=1142416&view=rev
Log:
WICKET-3859 WicketFilterTest.testIgnorePaths java.lang.IllegalStateException: Request#getLocale cannot return null, request has to have a locale set on it


Modified:
    wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java?rev=1142416&r1=1142415&r2=1142416&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java Sun Jul  3 11:18:37 2011
@@ -58,6 +58,7 @@ import org.apache.wicket.protocol.http.m
 import org.apache.wicket.request.http.WebRequest;
 import org.apache.wicket.request.resource.DynamicImageResource;
 import org.apache.wicket.util.file.WebXmlFile;
+import org.apache.wicket.util.tester.DummyHomePage;
 import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.xml.sax.SAXException;
@@ -346,10 +347,11 @@ public class WicketFilterTest extends Te
 		filter.init(new FilterTestingConfig());
 
 		HttpServletRequest request = mock(HttpServletRequest.class);
+		when(request.getLocale()).thenReturn(new Locale("bg", "BG"));
 		when(request.getRequestURI()).thenReturn("/contextPath/js/bla.js")
 			.thenReturn("/contextPath/css/bla.css")
 			.thenReturn("/contextPath/images/bla.img")
-			.thenReturn("/contextPath/something/real");
+			.thenReturn("/contextPath/servlet/wicket/bookmarkable/" + DummyHomePage.class.getName());
 		when(request.getContextPath()).thenReturn("/contextPath");
 		HttpServletResponse response = mock(HttpServletResponse.class);
 		FilterChain chain = mock(FilterChain.class);