@Test public void isExecutionDirectory_should_return_false_if_dont_contains_buildInformation() { String timestamp = String.valueOf(new Date().getTime()); File directory = new File(System.getProperty("java.io.tmpdir"), timestamp); directory.mkdirs(); try { boolean result = cut.isExecutionDirectory(directory, "buildInformation.json"); assertThat(result).isFalse(); } finally { FileUtils.deleteQuietly(directory); } }
Boolean isExecutionDirectory(File file, String buildInformationFilePath) { return file.isDirectory() && file.getName().matches("[0-9]+") && new File(file, buildInformationFilePath).exists(); }
ExecutionService { Boolean isExecutionDirectory(File file, String buildInformationFilePath) { return file.isDirectory() && file.getName().matches("[0-9]+") && new File(file, buildInformationFilePath).exists(); } }
ExecutionService { Boolean isExecutionDirectory(File file, String buildInformationFilePath) { return file.isDirectory() && file.getName().matches("[0-9]+") && new File(file, buildInformationFilePath).exists(); }  }
ExecutionService { Boolean isExecutionDirectory(File file, String buildInformationFilePath) { return file.isDirectory() && file.getName().matches("[0-9]+") && new File(file, buildInformationFilePath).exists(); }  @Transactional(readOnly = true) Page<ExecutionWithHandlingCountsDTO> findAll(long projectId, Pageable pageable); @Transactional(readOnly = true) ExecutionWithCountryDeploymentsAndRunsAndExecutedScenariosAndTeamIdsAndErrorsAndProblemsDTO findOneWithRuns(long projectId, long id, ExecutionCriteriaDTO criteria); ExecutionDTO discard(long projectId, long id, String discardReason); ExecutionDTO unDiscard(long projectId, long id); void requestCompletion(long projectId, String jobUrl); String getQualityStatus(long projectId, String jobUrl); List<ExecutionDTO> getLatestEligibleVersions(long projectId); void uploadExecutionReport(long projectId, String projectCode, String branch, String cycle, MultipartFile zipFile); void processSpecificDirectory(CycleDefinition cycleDefinition, File executionDirectory); }
ExecutionService { Boolean isExecutionDirectory(File file, String buildInformationFilePath) { return file.isDirectory() && file.getName().matches("[0-9]+") && new File(file, buildInformationFilePath).exists(); }  @Transactional(readOnly = true) Page<ExecutionWithHandlingCountsDTO> findAll(long projectId, Pageable pageable); @Transactional(readOnly = true) ExecutionWithCountryDeploymentsAndRunsAndExecutedScenariosAndTeamIdsAndErrorsAndProblemsDTO findOneWithRuns(long projectId, long id, ExecutionCriteriaDTO criteria); ExecutionDTO discard(long projectId, long id, String discardReason); ExecutionDTO unDiscard(long projectId, long id); void requestCompletion(long projectId, String jobUrl); String getQualityStatus(long projectId, String jobUrl); List<ExecutionDTO> getLatestEligibleVersions(long projectId); void uploadExecutionReport(long projectId, String projectCode, String branch, String cycle, MultipartFile zipFile); void processSpecificDirectory(CycleDefinition cycleDefinition, File executionDirectory);  }