-2

My Java test do not compile, I run it and have:

no junit tests could not find main class (specified in run-configuration)

dur
  • 15,689
  • 25
  • 79
  • 125
user281070
  • 1,341
  • 4
  • 11
  • 16
  • 4
    Please don't ask the same question twice: http://stackoverflow.com/questions/2332832/no-tests-found-with-test-runner-junit-4 – skaffman Feb 25 '10 at 09:47

2 Answers2

0

You don't have any @Test methods in your class.

JUnit4 looks for methods annotated with @Test - if it doesn't find any in a class, it omits that class completely.

Péter Török
  • 114,404
  • 31
  • 268
  • 329
0

I agree with Peter

@Test 
    public void testSomeBehavior() { 
        assertEquals("Empty list should have 0 elements", 0, emptyList.size()); 
    }