Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 51203 invoked from network); 5 Sep 2006 14:24:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2006 14:24:10 -0000 Received: (qmail 331 invoked by uid 500); 5 Sep 2006 14:24:08 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 99383 invoked by uid 500); 5 Sep 2006 14:24:06 -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 99372 invoked by uid 99); 5 Sep 2006 14:24:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 07:24:06 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.34.164.246] (HELO mx1.nuernberger.de) (212.34.164.246) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 07:24:04 -0700 Received: from mail2.local ([212.34.173.172]) by mx1.nuernberger.de (8.13.4/8.13.4) with ESMTP id k85ENhfV010656 for ; Tue, 5 Sep 2006 16:23:43 +0200 Received: from s999n6scn01.win.cs.nuernberger.net (unknown [10.0.81.127]) by mail2.local (mail2) with ESMTP id 4E9EF2ABA1 for ; Tue, 5 Sep 2006 16:23:43 +0200 (CEST) Received: from s999n6exc00.win.cs.nuernberger.net (unverified) by s999n6scn01.win.cs.nuernberger.net (Clearswift SMTPRS 5.1.7) with ESMTP id for ; Tue, 5 Sep 2006 15:33:50 +0200 Received: from S999VSEXC03.win.cs.nuernberger.net ([10.0.80.206]) by s999n6exc00.win.cs.nuernberger.net with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Sep 2006 15:33:50 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6D0EF.EBEBD8D4" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: JUnit4.1 support in Ant 1.7 Beta Date: Tue, 5 Sep 2006 15:33:49 +0200 Message-ID: <04894002CEE1154CA7A260CBAAB016DB01CF4475@S999VSEXC03.win.cs.nuernberger.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: JUnit4.1 support in Ant 1.7 Beta Thread-Index: AcbQ7+vEL4RW1CLTTG267u8jQP0w1w== From: To: X-OriginalArrivalTime: 05 Sep 2006 13:33:50.0347 (UTC) FILETIME=[EC1925B0:01C6D0EF] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C6D0EF.EBEBD8D4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have some problems in testing java classes with Junit 4.1 and Ant 1.7 Bet= a. 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 JUnit4T= estAdapter. If I run the ant script I get the exception: "No runnable methods". But if I run the ant script with the attribute fork=3D"yes" the junit testc= ase can be executed and I get an "AssertionFailedError". Can anyone help me finding out, how to start the ant script without VM-fork= ing (attribute fork=3D"yes"). Here is the junit task of my ant-script: Here is the test-case: public class SingletonTest { @Test=20 public void createSingleton() { TestMock1 s1 =3D new TestMock1(); TestMock1 s2 =3D new TestMock1(); =20 assertEquals(s1, s2); assertTrue(s1.getInvocationTime() =3D=3D s2.getInvocationTime()); =20 TestMock2 s3 =3D new TestMock2(); TestMock2 s4 =3D new TestMock2(); =20 assertEquals(s3, s4); assertTrue(s3.getInvocationTime() =3D=3D s4.getInvocationTime()); assertNotSame(s1, s3); } } and one mock object representatively for the others: @Singleton public class TestMock1 { protected Long invocationTime =3D System.currentTimeMillis(); =20 /** * R=FCckgabe der Instanziierungszeit * @return long - Timestamp */ public Long getInvocationTime() { return invocationTime;=20 } --- Regards Mirko Mit freundlichen Gr=FC=DFen=20 Mirko Zieroth=20 AE-Softwarearchitektur=20 N=DCRNBERGER VERSICHERUNGSGRUPPE=20 Ostendstra=DFe 100, 90334 N=FCrnberg=20 Telefon (09 11) 5 31-26 88, Fax 0911-531-81-2688=20 mailto:Mirko.Zieroth@nuernberger.de Hinweis: Der Inhalt dieser E-Mail ist ausschlie=DFlich f=FCr den bezeichneten Empf= =E4nger bestimmt und kann vertrauliche Informationen enthalten. Wenn Sie ni= cht der Empf=E4nger dieser E-Mail oder dessen Vertreter sind, dann senden S= ie bitte die E-Mail an den Absender zur=FCck (Antwort-Funktion bzw. reply e= mail). Entfernen Sie bitte danach die Nachricht aus Ihrem System. This e-mail message including any attachments may contain privileged or con= fidential information and is for the sole use of the intended recipient(s).= If you are not the intended recipient, please immediately return this e-ma= il message to the sender by reply e-mail, delete the original message and d= estroy all copies thereof. MSW 5.1 ------_=_NextPart_001_01C6D0EF.EBEBD8D4--