-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
  • 14,335
  • 22
  • 74
  • 113
user281070
  • 1,321
  • 4
  • 11
  • 15
  • 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
  • 112,083
  • 30
  • 265
  • 327
0

I agree with Peter

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