NitorCreations / CoreComponents

Nitor Creations Core Components
22 stars 11 forks source link

@Ignore is not honored on inner classes #9

Open theoamonteiro opened 8 years ago

theoamonteiro commented 8 years ago

I would like to annotate a whole inner class with @Ignore and dismiss all test cases from there

@RunWith(NestedRunner.class)
public class Tester {

    @Test
    public void test() {
        assertTrue(true);
    }

    public class Nested {

        @Test
        public void test() {
            assertTrue(true);
        }

        @Ignore
        public class Ignored {

            @Test
            public void test() {
                fail("Should be ignored");
            }

            public class InnerIgnored {

                @Test
                public void test() {
                    fail("Should be ignored");
                }

            }

        }

        public class NotIgnored {

            @Test
            public void test() {
                assertTrue(true);
            }

            public class InnerNotIgnored {

                @Test
                public void test() {
                    assertTrue(true);
                }

            }
        }

    }

}