I tried to modified the variable names so that those who willing to help me out
can understand my problem a bit easier. But it seems I missed this one. Thanks
for reminding me that. the "correct problem code" should be as you pointed out
(listed below). But it still doesn't work as expected.
Louis
import org.junit.*;
import static org.junit.Assert.*;
import junit.framework.JUnit4TestAdapter;
public class MyTest {
private int i;
@Before public void runOnceBeforeAllTests()
{
i = 10;
}
@Test public void test4()
{
assertEquals(10, i);
}
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(MyTest.class);
}
}
-----Original Message-----
From: Jeffrey D. Brekke [mailto:[EMAIL PROTECTED]
Sent: Fri 19/05/2006 02:59
To: Maven Users List
Subject: Re: surefire 2.2 + JUnit4?
I don't know much about surefire, but it looks like the adapter is
pointing to the incorrect class? Should be MyTest.class?
Cheng-Yang Tang wrote:
[SNIPPED]
> import org.junit.*;
> import static org.junit.Assert.*;
> import junit.framework.JUnit4TestAdapter;
>
> public class MyTest {
>
> private int i;
>
> @Before public void runOnceBeforeAllTests()
> {
> i = 10;
> }
>
> @Test public void test4()
> {
> assertEquals(10, i);
> }
>
> public static junit.framework.Test suite()
> {
> return new JUnit4TestAdapter(WebServiceDispatcher.class);
> }
> }
--
=====================================================================
Jeffrey D. Brekke [EMAIL PROTECTED]
Wisconsin, USA [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.bloglines.com/blog/jbrekke [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]