@Test public void canLookInMultipleClassDirectories() throws Exception { File newFile = createFileForClass(TestFakeProduct.class); File thisFile = InfinitestTestUtils.getFileForClass(getClass()); Set<File> changedFiles = detector.findChangedFiles(); assertThat(changedFiles, hasItem(newFile)); assertThat(changedFiles, hasItem(thisFile)); }
private File createFileForClass(Class<TestFakeProduct> clazz) throws IOException { File destFile = InfinitestTestUtils.getFileForClass(altClassDir, clazz.getName()); assertTrue(destFile.getParentFile().mkdirs()); assertTrue(destFile.createNewFile()); return destFile; }