@Test public void existsOnDiskTest() { projectFiles.add("pom.xml"); assertFalse(project.existsOnDisk()); projectFiles.add("/src/pom.xml"); assertTrue(project.existsOnDisk()); project.setProjectFiles(new ArrayList<String>()); assertFalse(project.existsOnDisk()); }
public boolean existsOnDisk() { synchronized (projectFiles) { for (String file : projectFiles) { if (file.replace(getRootPath(), "").contains("/src/")) { return true; } } } return false; }
Project { public boolean existsOnDisk() { synchronized (projectFiles) { for (String file : projectFiles) { if (file.replace(getRootPath(), "").contains("/src/")) { return true; } } } return false; } }
Project { public boolean existsOnDisk() { synchronized (projectFiles) { for (String file : projectFiles) { if (file.replace(getRootPath(), "").contains("/src/")) { return true; } } } return false; } Project(Exercise exercise);  Project(Exercise exercise, List<String> projectFiles); }
Project { public boolean existsOnDisk() { synchronized (projectFiles) { for (String file : projectFiles) { if (file.replace(getRootPath(), "").contains("/src/")) { return true; } } } return false; } Project(Exercise exercise);  Project(Exercise exercise, List<String> projectFiles); Exercise getExercise(); void setExercise(Exercise exercise); String getRootPath(); ProjectType getProjectType(); boolean containsFile(String file); @Override boolean equals(Object o); @Override int hashCode(); ZippingDecider getZippingDecider(); void setProjectFiles(List<String> files); List<String> getReadOnlyProjectFiles(); String getProjectFileByName(String fileName); void addProjectFile(String file); void removeProjectFile(String path); void setExtraStudentFiles(List<String> files); List<String> getExtraStudentFiles(); boolean existsOnDisk(); ProjectStatus getStatus(); void setStatus(ProjectStatus status); }
Project { public boolean existsOnDisk() { synchronized (projectFiles) { for (String file : projectFiles) { if (file.replace(getRootPath(), "").contains("/src/")) { return true; } } } return false; } Project(Exercise exercise);  Project(Exercise exercise, List<String> projectFiles); Exercise getExercise(); void setExercise(Exercise exercise); String getRootPath(); ProjectType getProjectType(); boolean containsFile(String file); @Override boolean equals(Object o); @Override int hashCode(); ZippingDecider getZippingDecider(); void setProjectFiles(List<String> files); List<String> getReadOnlyProjectFiles(); String getProjectFileByName(String fileName); void addProjectFile(String file); void removeProjectFile(String path); void setExtraStudentFiles(List<String> files); List<String> getExtraStudentFiles(); boolean existsOnDisk(); ProjectStatus getStatus(); void setStatus(ProjectStatus status);  }