Repository: wicket
Updated Branches:
  refs/heads/master ea1dc12e4 -> 17be97395


WICKET-5926 Arquillian Support with Container ServletContext in 
BaseWicketTester/WicketTester.

BaseWicketTester should not use JUnit classes.
Minor code formatting


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/17be9739
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/17be9739
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/17be9739

Branch: refs/heads/master
Commit: 17be97395b4a03f2ce6e2586fd54e771669f1403
Parents: ea1dc12
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Thu Jun 25 11:23:19 2015 +0300
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Thu Jun 25 11:23:19 2015 +0300

----------------------------------------------------------------------
 .../apache/wicket/util/tester/BaseWicketTester.java   | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/17be9739/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index 773a433..71d1943 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -137,7 +137,6 @@ import org.apache.wicket.util.string.Strings;
 import org.apache.wicket.util.time.Duration;
 import org.apache.wicket.util.visit.IVisit;
 import org.apache.wicket.util.visit.IVisitor;
-import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -291,12 +290,11 @@ public class BaseWicketTester
         */
        public BaseWicketTester(final WebApplication application, final 
ServletContext servletCtx, boolean init)
        {
-               // Assert the application is not null.
-               if(!init)
+               if (!init)
                {
-                       Assert.assertNotNull("WebApplication cannot be 
null",application);
+                       Args.notNull(application, "application");
                }
-               
+
                servletContext = servletCtx != null ? servletCtx
                        // If it's provided from the container it's not 
necessary to mock. 
                        : !init && application.getServletContext() != null ? 
application.getServletContext()
@@ -324,17 +322,17 @@ public class BaseWicketTester
                this.application = application;
 
                // If it's provided from the container it's not necessary to 
set again.
-               if(init)
+               if (init)
                {
                        // FIXME some tests are leaking applications by not 
calling destroy on them or overriding
                        // teardown() without calling super, for now we work 
around by making each name unique
                        application.setName("WicketTesterApplication-" + 
UUID.randomUUID());
                }
-               
+
                ThreadContext.setApplication(application);
 
                // If it's provided from the container it's not necessary to 
set again and init.
-               if(init)
+               if (init)
                {
                        application.setServletContext(servletContext);
                        // initialize the application

Reply via email to