@Test public void testPrepareOutputFolders() { String[] resultPaths = new String[]{"build/tmp/logFolderCreatorTest/xml", "build/tmp/logFolderCreatorTest/csv", "build/tmp/logFolderCreatorTest/html"}; environment.setProperty(Environment.GEPARD_RESULT_PATH, "build/tmp/logFolderCreatorTest"); environment.setProperty(Environment.GEPARD_XML_RESULT_PATH, resultPaths[0]); environment.setProperty(Environment.GEPARD_CSV_RESULT_PATH, resultPaths[1]); environment.setProperty(Environment.GEPARD_HTML_RESULT_PATH, resultPaths[2]); underTest.prepareOutputFolders(); for (int i = 0; i < 3; i++) { File f = new File(resultPaths[i]); if (f.exists()) { Assert.assertTrue(true); } else { Assert.assertTrue(false); } } }
public void prepareOutputFolders() { deleteFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH)); createFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH), "Cannot create general result dir: "); createFolder(environment.getProperty(Environment.GEPARD_XML_RESULT_PATH), "Cannot create XML result dir: "); createFolder(environment.getProperty(Environment.GEPARD_CSV_RESULT_PATH), "Cannot create CSV result dir: "); createFolder(environment.getProperty(Environment.GEPARD_HTML_RESULT_PATH), "Cannot create HTML result dir: "); }
LogFolderCreator { public void prepareOutputFolders() { deleteFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH)); createFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH), "Cannot create general result dir: "); createFolder(environment.getProperty(Environment.GEPARD_XML_RESULT_PATH), "Cannot create XML result dir: "); createFolder(environment.getProperty(Environment.GEPARD_CSV_RESULT_PATH), "Cannot create CSV result dir: "); createFolder(environment.getProperty(Environment.GEPARD_HTML_RESULT_PATH), "Cannot create HTML result dir: "); } }
LogFolderCreator { public void prepareOutputFolders() { deleteFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH)); createFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH), "Cannot create general result dir: "); createFolder(environment.getProperty(Environment.GEPARD_XML_RESULT_PATH), "Cannot create XML result dir: "); createFolder(environment.getProperty(Environment.GEPARD_CSV_RESULT_PATH), "Cannot create CSV result dir: "); createFolder(environment.getProperty(Environment.GEPARD_HTML_RESULT_PATH), "Cannot create HTML result dir: "); } LogFolderCreator(final Environment environment); }
LogFolderCreator { public void prepareOutputFolders() { deleteFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH)); createFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH), "Cannot create general result dir: "); createFolder(environment.getProperty(Environment.GEPARD_XML_RESULT_PATH), "Cannot create XML result dir: "); createFolder(environment.getProperty(Environment.GEPARD_CSV_RESULT_PATH), "Cannot create CSV result dir: "); createFolder(environment.getProperty(Environment.GEPARD_HTML_RESULT_PATH), "Cannot create HTML result dir: "); } LogFolderCreator(final Environment environment); void prepareOutputFolders(); }
LogFolderCreator { public void prepareOutputFolders() { deleteFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH)); createFolder(environment.getProperty(Environment.GEPARD_RESULT_PATH), "Cannot create general result dir: "); createFolder(environment.getProperty(Environment.GEPARD_XML_RESULT_PATH), "Cannot create XML result dir: "); createFolder(environment.getProperty(Environment.GEPARD_CSV_RESULT_PATH), "Cannot create CSV result dir: "); createFolder(environment.getProperty(Environment.GEPARD_HTML_RESULT_PATH), "Cannot create HTML result dir: "); } LogFolderCreator(final Environment environment); void prepareOutputFolders();  }