@Test void createBuildFolderIfItDoesNotExist_createsTheFolderBecauseIfItDoesNotExist() { givenBuildFolderDoesNotExist(); fileSystemOperationsDao.createBuildFolderIfItDoesNotExist(buildIdentifier); expectBuildFolderExists(); }
public void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier) { File buildFolder = getBuildFolder(buildIdentifier); if (buildFolder.exists()) { LOGGER.debug("Build folder " + buildFolder.getAbsolutePath() + " already exists."); return; } buildFolder.mkdirs(); if (buildFolder.exists()) { LOGGER.info("Created build folder " + buildFolder.getAbsolutePath()); } else { LOGGER.error("Could not create build folder " + buildFolder.getAbsolutePath()); } }
FileSystemOperationsDao { public void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier) { File buildFolder = getBuildFolder(buildIdentifier); if (buildFolder.exists()) { LOGGER.debug("Build folder " + buildFolder.getAbsolutePath() + " already exists."); return; } buildFolder.mkdirs(); if (buildFolder.exists()) { LOGGER.info("Created build folder " + buildFolder.getAbsolutePath()); } else { LOGGER.error("Could not create build folder " + buildFolder.getAbsolutePath()); } } }
FileSystemOperationsDao { public void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier) { File buildFolder = getBuildFolder(buildIdentifier); if (buildFolder.exists()) { LOGGER.debug("Build folder " + buildFolder.getAbsolutePath() + " already exists."); return; } buildFolder.mkdirs(); if (buildFolder.exists()) { LOGGER.info("Created build folder " + buildFolder.getAbsolutePath()); } else { LOGGER.error("Could not create build folder " + buildFolder.getAbsolutePath()); } } FileSystemOperationsDao(); }
FileSystemOperationsDao { public void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier) { File buildFolder = getBuildFolder(buildIdentifier); if (buildFolder.exists()) { LOGGER.debug("Build folder " + buildFolder.getAbsolutePath() + " already exists."); return; } buildFolder.mkdirs(); if (buildFolder.exists()) { LOGGER.info("Created build folder " + buildFolder.getAbsolutePath()); } else { LOGGER.error("Could not create build folder " + buildFolder.getAbsolutePath()); } } FileSystemOperationsDao(); void deleteBuild(final BuildIdentifier buildIdentifier); void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier); boolean buildFolderExists(final BuildIdentifier buildIdentifier); }
FileSystemOperationsDao { public void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier) { File buildFolder = getBuildFolder(buildIdentifier); if (buildFolder.exists()) { LOGGER.debug("Build folder " + buildFolder.getAbsolutePath() + " already exists."); return; } buildFolder.mkdirs(); if (buildFolder.exists()) { LOGGER.info("Created build folder " + buildFolder.getAbsolutePath()); } else { LOGGER.error("Could not create build folder " + buildFolder.getAbsolutePath()); } } FileSystemOperationsDao(); void deleteBuild(final BuildIdentifier buildIdentifier); void createBuildFolderIfItDoesNotExist(final BuildIdentifier buildIdentifier); boolean buildFolderExists(final BuildIdentifier buildIdentifier);  }