Return-Path: Delivered-To: apmail-incubator-bval-commits-archive@minotaur.apache.org Received: (qmail 50931 invoked from network); 23 Feb 2011 21:09:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 21:09:57 -0000 Received: (qmail 65411 invoked by uid 500); 23 Feb 2011 21:09:57 -0000 Delivered-To: apmail-incubator-bval-commits-archive@incubator.apache.org Received: (qmail 65375 invoked by uid 500); 23 Feb 2011 21:09:56 -0000 Mailing-List: contact bval-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bval-dev@incubator.apache.org Delivered-To: mailing list bval-commits@incubator.apache.org Received: (qmail 65368 invoked by uid 99); 23 Feb 2011 21:09:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 21:09:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 21:09:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1B4EF23889E9; Wed, 23 Feb 2011 21:09:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: bval-commits@incubator.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110223210936.1B4EF23889E9@eris.apache.org> 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() {