@Test public void getJavaSourceFiles() { final DefaultProjectFileSystem fs = newDefaultProjectFileSystem(project); assertThat(fs.getJavaSourceFiles().size(), is(2)); assertThat(fs.getJavaSourceFiles(), hasItem(named("Bar.java"))); assertThat(fs.getJavaSourceFiles(), hasItem(named("Whizz.java"))); }
@Test public void applyExclusionPatternsToSourceFiles() { PropertiesConfiguration conf = new PropertiesConfiguration(); conf.setProperty(CoreProperties.PROJECT_EXCLUSIONS_PROPERTY, "**/B*.java"); project.setConfiguration(conf); final DefaultProjectFileSystem fs = newDefaultProjectFileSystem(project); assertThat(fs.getJavaSourceFiles().size(), is(1)); assertThat(fs.getJavaSourceFiles(), hasItem(named("Whizz.java"))); }