Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 61432 invoked from network); 10 Sep 2006 19:50:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Sep 2006 19:50:12 -0000 Received: (qmail 99221 invoked by uid 500); 10 Sep 2006 19:50:07 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 99191 invoked by uid 500); 10 Sep 2006 19:50:07 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 99179 invoked by uid 99); 10 Sep 2006 19:50:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Sep 2006 12:50:07 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of antoine@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 10 Sep 2006 12:50:05 -0700 Received: (qmail 23895 invoked by uid 0); 10 Sep 2006 19:49:43 -0000 Received: from 66.28.87.10 by www115.gmx.net with HTTP; Sun, 10 Sep 2006 21:49:43 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" Date: Sun, 10 Sep 2006 21:49:44 +0200 From: "Antoine Levy-Lambert" In-Reply-To: <04894002CEE1154CA7A260CBAAB016DB01CF43FE@S999VSEXC03.win.cs.nuernberger.net> Message-ID: <20060910194944.33440@gmx.net> MIME-Version: 1.0 References: <04894002CEE1154CA7A260CBAAB016DB01CF43FE@S999VSEXC03.win.cs.nuernberger.net> Subject: Re: JUnit4.1 support in Ant 1.7 Beta To: "Ant Users List" X-Authenticated: #22961642 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Mirko, I have the impression that no one answered your posting(s). By the way, there is no need to send 3 times the same email. I would suggest that you create a bug report under http://issues.apache.org/bugzilla . Let's hope that someone will have the time to work on it. Regards, Antoine -------- Original-Nachricht -------- Datum: Tue, 5 Sep 2006 14:17:58 +0200 Von: Mirko.Zieroth@nuernberger.de An: user@ant.apache.org Betreff: JUnit4.1 support in Ant 1.7 Beta > Hi, > > I have some problems in testing java classes with Junit 4.1 and Ant 1.7 > Beta. > > The classes to be tested are Singletons written with AspectJ and Java 1.5. > The test-classes are pure Junit 4 tests with anotations and without > JUnit4TestAdapter. > > If I run the ant script I get the exception: "No runnable methods". > But if I run the ant script with the attribute fork="yes" the junit > testcase can be executed and I get an "AssertionFailedError". > > Can anyone help me finding out, how to start the ant script without > VM-forking (attribute fork="yes"). > > > Here is the junit task of my ant-script: > > > > > > > > > > > > > > > > > > > > Here is the test-case: > > public class SingletonTest > { > @Test > public void createSingleton() > { > TestMock1 s1 = new TestMock1(); > TestMock1 s2 = new TestMock1(); > > assertEquals(s1, s2); > assertTrue(s1.getInvocationTime() == s2.getInvocationTime()); > > TestMock2 s3 = new TestMock2(); > TestMock2 s4 = new TestMock2(); > > assertEquals(s3, s4); > assertTrue(s3.getInvocationTime() == s4.getInvocationTime()); > assertNotSame(s1, s3); > } > } > > and one mock object representatively for the others: > > @Singleton > public class TestMock1 > { > protected Long invocationTime = System.currentTimeMillis(); > > /** > * R�ckgabe der Instanziierungszeit > * @return long - Timestamp > */ > public Long getInvocationTime() > { > return invocationTime; > } > > --- > Regards > Mirko > > Hinweis: > Der Inhalt dieser E-Mail ist ausschlie�lich f�r den bezeichneten > Empf�nger bestimmt und kann vertrauliche Informationen enthalten. Wenn Sie nicht > der Empf�nger dieser E-Mail oder dessen Vertreter sind, dann senden Sie > bitte die E-Mail an den Absender zur�ck (Antwort-Funktion bzw. reply email). > Entfernen Sie bitte danach die Nachricht aus Ihrem System. > This e-mail message including any attachments may contain privileged or > confidential information and is for the sole use of the intended > recipient(s). If you are not the intended recipient, please immediately return this > e-mail message to the sender by reply e-mail, delete the original message and > destroy all copies thereof. > MSW 5.1 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org