Netbeans seems to ignore JUnit's FixMethodOrder

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Netbeans seems to ignore JUnit's FixMethodOrder

noamsinger
Hello,

I am using NetBeans 8.1 and Junit 4.12. The following code is supposed to run in a name ascending order, however it seems netbeans just ignores the order. Is the a problem for netbeans WRT FixMethodOrder ?

Thanks

The code:


Code:
package misc.test;
import org.junit.*;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestJUnitOrder {

    public TestJUnitOrder() {}

    @BeforeClass
    public static void setUpClass() {}

    @AfterClass
    public static void tearDownClass() {}

    @Before
    public void setUp() {}

    @After
    public void tearDown() {}

    @Test
    public void hello000() { System.out.println("hello000"); }

    @Test
    public void hello999() { System.out.println("hello999"); }

    @Test
    public void hello001() { System.out.println("hello001"); }

    @Test
    public void hello010() { System.out.println("hello010"); }

    @Test
    public void hello100() { System.out.println("hello100"); }

    @Test
    public void hello002() { System.out.println("hello002"); }
}




The output:


Code:
hello999
hello000
hello001
hello010
hello002
hello100







Loading...