Ejemplo n.º 1
0
 @org.junit.Test
 public void testIncludes() {
   assertSame(test, test.include(TEST_PATTERN_1, TEST_PATTERN_2));
   assertEquals(toLinkedSet(TEST_PATTERN_1, TEST_PATTERN_2), test.getIncludes());
   test.include(TEST_PATTERN_3);
   assertEquals(toLinkedSet(TEST_PATTERN_1, TEST_PATTERN_2, TEST_PATTERN_3), test.getIncludes());
 }
Ejemplo n.º 2
0
  @org.junit.Test
  public void testScansForTestClassesInTheTestClassesDir() {
    configureTask();
    test.include("include");
    test.exclude("exclude");

    FileTree classFiles = test.getCandidateClassFiles();
    assertThat(classFiles, instanceOf(ConfigurableFileTree.class));
    ConfigurableFileTree files = (ConfigurableFileTree) classFiles;
    assertThat(files.getDir(), equalTo(classesDir));
    assertThat(files.getIncludes(), equalTo(toSet("include")));
    assertThat(files.getExcludes(), equalTo(toSet("exclude")));
  }