incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1073949 - /incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java
Date Wed, 23 Feb 2011 21:09:36 GMT
Author: simonetripodi
Date: Wed Feb 23 21:09:35 2011
New Revision: 1073949

URL: http://svn.apache.org/viewvc?rev=1073949&view=rev
Log:
create the injector and inject test members in one shot
added tearDown method implementation

Modified:
    incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java

Modified: incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java?rev=1073949&r1=1073948&r2=1073949&view=diff
==============================================================================
--- incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java
(original)
+++ incubator/bval/trunk/bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java
Wed Feb 23 21:09:35 2011
@@ -26,7 +26,6 @@ import javax.validation.Validator;
 import junit.framework.TestCase;
 
 import com.google.inject.Guice;
-import com.google.inject.Injector;
 
 /**
  * 
@@ -51,8 +50,13 @@ public final class GuiceAwareValidationT
 
     @Override
     protected void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new ValidationModule());
-        injector.injectMembers(this);
+        Guice.createInjector(new ValidationModule()).injectMembers(this);
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        this.validator = null;
+        this.dummyCountryDao = null;
     }
 
     public void testInjectedValidation() {



Mime
View raw message