In a JUnit test case with multiple @Test annotations, how does one selectively run tests ?
For e.g., from the following code, how does one run just one test method ?
@Test
public void testHelloEmpty()
{
assertEquals(h.getName(),"");
assertEquals(h.getMessage(),"Hello!");
}
@Test
public void testHelloWorld()
{
// h.setName("World");
assertEquals(h.getName(),"World");
assertEquals(h.getMessage(),"Hello World!");
}
I have tried to just highlight one @Test method and tried to run it, but it doesn't work that way.