blob: e193712c96d677c6b2d9128a6283911d3e9b1475 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package org.junit.tests.running.classes;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
public class IgnoreClassTest {
@Ignore("For a good reason") public static class IgnoreMe {
@Test public void iFail() {
fail();
}
@Test public void iFailToo() {
fail();
}
}
@Test public void ignoreClass() {
Result result= JUnitCore.runClasses(IgnoreMe.class);
assertEquals(0, result.getFailureCount());
assertEquals(1, result.getIgnoreCount());
}
}
|