@Test(dataProvider = "createJsonFilePathDP") public void createJsonFilePath(String outputJsonDir, String testSuiteId, String expectedFilePathRegEx) throws SakuliForwarderCheckedException { doReturn(testSuiteId).when(testSuite).getId(); doReturn(Paths.get(outputJsonDir)).when(jsonProperties).getOutputJsonDir(); assertTrue(testling.createJsonFilePath(testSuite.getId()).toString().matches(expectedFilePathRegEx)); }
protected Path createJsonFilePath(String dataId) throws SakuliForwarderCheckedException { Path outputDir = jsonProperties.getOutputJsonDir(); createDirectoryIfNotExists(outputDir); String fileName = dataId + "_" + JSON_FILE_DATE_FORMAT.format(new Date()) + ".json"; return outputDir.resolve(fileName); }
JsonResultServiceImpl extends AbstractTeardownService implements ResultService { protected Path createJsonFilePath(String dataId) throws SakuliForwarderCheckedException { Path outputDir = jsonProperties.getOutputJsonDir(); createDirectoryIfNotExists(outputDir); String fileName = dataId + "_" + JSON_FILE_DATE_FORMAT.format(new Date()) + ".json"; return outputDir.resolve(fileName); } }
JsonResultServiceImpl extends AbstractTeardownService implements ResultService { protected Path createJsonFilePath(String dataId) throws SakuliForwarderCheckedException { Path outputDir = jsonProperties.getOutputJsonDir(); createDirectoryIfNotExists(outputDir); String fileName = dataId + "_" + JSON_FILE_DATE_FORMAT.format(new Date()) + ".json"; return outputDir.resolve(fileName); }  }
JsonResultServiceImpl extends AbstractTeardownService implements ResultService { protected Path createJsonFilePath(String dataId) throws SakuliForwarderCheckedException { Path outputDir = jsonProperties.getOutputJsonDir(); createDirectoryIfNotExists(outputDir); String fileName = dataId + "_" + JSON_FILE_DATE_FORMAT.format(new Date()) + ".json"; return outputDir.resolve(fileName); }  @Override int getServicePriority(); @Override void teardownTestSuite(@NonNull TestSuite testSuite); }
JsonResultServiceImpl extends AbstractTeardownService implements ResultService { protected Path createJsonFilePath(String dataId) throws SakuliForwarderCheckedException { Path outputDir = jsonProperties.getOutputJsonDir(); createDirectoryIfNotExists(outputDir); String fileName = dataId + "_" + JSON_FILE_DATE_FORMAT.format(new Date()) + ".json"; return outputDir.resolve(fileName); }  @Override int getServicePriority(); @Override void teardownTestSuite(@NonNull TestSuite testSuite); static final SimpleDateFormat JSON_FILE_DATE_FORMAT; }