@Test public void testGetTestsFromSuiteMatchingAll() throws InitializationError { // when List<Class<?>> collectedTests = m_testSuite.getSuiteOrTestMatchingRegex(".*"); // then assertEquals(7, collectedTests.size()); }
@Test public void testGetTestsFromSuiteMatchingTest() throws InitializationError { // when List<Class<?>> collectedTests = m_testSuite.getSuiteOrTestMatchingRegex(".*Test.*"); // then assertEquals(7, collectedTests.size()); assertThat( collectedTests, hasItems(FirstSubSuiteTest.class, SecondSubSuiteTest.class, UnusualTest.class)); assertThat( collectedTests, not(hasItems(new Class<?>[] {ExampleSubSuite.class, EmptySuite.class}))); }