ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: JUnit task problem
Date Thu, 17 Feb 2005 20:18:12 GMT
It used to be that a String-Ctor was required, but with the latest JUnit
(3.8.1), you can finally have a Ctor-less testcase, as simple as below.
--DD

public class TestFoo extends junit.framework.TestCase {
  public void testFoo() { fail("TODO"); }
}

PS: Here's what I use. You probably want the first formatter.

    <junit ... printsummary="off">
      ...

      <!-- Plain console formatter for now -->
      <formatter type="brief" usefile="false" />

      <!-- XML formatter to later convert test logs to HTML -->
      <formatter type="xml" usefile="true" />
    </junit>

> -----Original Message-----
> From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Sent: Thursday, February 17, 2005 1:45 PM
> To: Ant Users List
> Subject: RE: JUnit task problem
> 
> I thought of that too... I wasn't sure it it was needed or not so I
left
> it out just to have a slightly simpler class... however, I did try
putting
> it in and it doesn't make the error go away.  I'll leave it in for now
> anyway, but that doesn't seem to be it.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, February 17, 2005 2:38 pm, Kajsa.Anderson@thomson.com said:
> > I think your test class needs a constructor (inserted below).
> >
> >> -----Original Message-----
> >> From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
> >> Sent: Thursday, February 17, 2005 11:29 AM
> >> To: user@ant.apache.org
> >> Subject: JUnit task problem
> >>
> >>
> >> Hi again... having a bit of problem with my first attempt at
> >> a JUnit task...
> >>
> >> I have the following test case:
> >>
> >> import junit.framework.TestCase;
> >> public class DisbursementFBTestCase extends TestCase {
> >
> >     public DisbursementFBTestCase(String testName) {
> >       super(testName);
> >     }
> >
> >>   public void testDisbursementFBTestCase() throws Exception {
> >>     int answer = 2;
> >>     assertEquals((1+1), answer);
> >>   }
> >> }
> >> ...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message