@Test public void setCustomParametersFileTest() throws CluecumberPluginException { String customParametersFile = "src/test/resources/test.properties"; when(fileIO.isExistingFile(customParametersFile)).thenCallRealMethod(); when(fileIO.readContentFromFile(customParametersFile)).thenCallRealMethod(); propertyManager.setCustomParametersFile(customParametersFile); assertThat(propertyManager.getCustomParametersFile(), is(customParametersFile)); final Map<String, String> customParameters = propertyManager.getCustomParameters(); assertThat(customParameters.size(), is(2)); assertThat(customParameters.get("Test_Property"), is("some value")); assertThat(customParameters.get("Test_Property2"), is("another value")); }
public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException { this.customParametersFile = customParametersFile; if (!isSet(customParametersFile)) { return; } if (!fileIO.isExistingFile(customParametersFile)) { throw new MissingFileException(customParametersFile + " (customParametersFile)"); } Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile); this.customParameters.putAll(customParameters); }
PropertyManager { public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException { this.customParametersFile = customParametersFile; if (!isSet(customParametersFile)) { return; } if (!fileIO.isExistingFile(customParametersFile)) { throw new MissingFileException(customParametersFile + " (customParametersFile)"); } Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile); this.customParameters.putAll(customParameters); } }
PropertyManager { public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException { this.customParametersFile = customParametersFile; if (!isSet(customParametersFile)) { return; } if (!fileIO.isExistingFile(customParametersFile)) { throw new MissingFileException(customParametersFile + " (customParametersFile)"); } Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile); this.customParameters.putAll(customParameters); } @Inject  PropertyManager(
            final CluecumberLogger logger,
            FileIO fileIO,
            final PropertiesFileLoader propertiesFileLoader
    ); }
PropertyManager { public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException { this.customParametersFile = customParametersFile; if (!isSet(customParametersFile)) { return; } if (!fileIO.isExistingFile(customParametersFile)) { throw new MissingFileException(customParametersFile + " (customParametersFile)"); } Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile); this.customParameters.putAll(customParameters); } @Inject  PropertyManager(
            final CluecumberLogger logger,
            FileIO fileIO,
            final PropertiesFileLoader propertiesFileLoader
    ); String getSourceJsonReportDirectory(); void setSourceJsonReportDirectory(final String sourceJsonReportDirectory); String getGeneratedHtmlReportDirectory(); void setGeneratedHtmlReportDirectory(final String generatedHtmlReportDirectory); Map<String, String> getCustomParameters(); void setCustomParameters(final Map<String, String> customParameters); void setCustomParametersFile(String customParametersFile); boolean isFailScenariosOnPendingOrUndefinedSteps(); void setFailScenariosOnPendingOrUndefinedSteps(final boolean failScenariosOnPendingOrUndefinedSteps); boolean isExpandBeforeAfterHooks(); void setExpandBeforeAfterHooks(final boolean expandBeforeAfterHooks); boolean isExpandStepHooks(); void setExpandStepHooks(final boolean expandStepHooks); boolean isExpandDocStrings(); void setExpandDocStrings(final boolean expandDocStrings); String getCustomCssFile(); void setCustomCssFile(final String customCssFile); String getCustomStatusColorPassed(); void setCustomStatusColorPassed(final String customStatusColorPassed); String getCustomStatusColorFailed(); void setCustomStatusColorFailed(final String customStatusColorFailed); String getCustomStatusColorSkipped(); void setCustomStatusColorSkipped(final String customStatusColorSkipped); String getCustomPageTitle(); void setCustomPageTitle(final String customPageTitle); void logProperties(); PluginSettings.StartPage getStartPage(); void setStartPage(final String startPage); }
PropertyManager { public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException { this.customParametersFile = customParametersFile; if (!isSet(customParametersFile)) { return; } if (!fileIO.isExistingFile(customParametersFile)) { throw new MissingFileException(customParametersFile + " (customParametersFile)"); } Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile); this.customParameters.putAll(customParameters); } @Inject  PropertyManager(
            final CluecumberLogger logger,
            FileIO fileIO,
            final PropertiesFileLoader propertiesFileLoader
    ); String getSourceJsonReportDirectory(); void setSourceJsonReportDirectory(final String sourceJsonReportDirectory); String getGeneratedHtmlReportDirectory(); void setGeneratedHtmlReportDirectory(final String generatedHtmlReportDirectory); Map<String, String> getCustomParameters(); void setCustomParameters(final Map<String, String> customParameters); void setCustomParametersFile(String customParametersFile); boolean isFailScenariosOnPendingOrUndefinedSteps(); void setFailScenariosOnPendingOrUndefinedSteps(final boolean failScenariosOnPendingOrUndefinedSteps); boolean isExpandBeforeAfterHooks(); void setExpandBeforeAfterHooks(final boolean expandBeforeAfterHooks); boolean isExpandStepHooks(); void setExpandStepHooks(final boolean expandStepHooks); boolean isExpandDocStrings(); void setExpandDocStrings(final boolean expandDocStrings); String getCustomCssFile(); void setCustomCssFile(final String customCssFile); String getCustomStatusColorPassed(); void setCustomStatusColorPassed(final String customStatusColorPassed); String getCustomStatusColorFailed(); void setCustomStatusColorFailed(final String customStatusColorFailed); String getCustomStatusColorSkipped(); void setCustomStatusColorSkipped(final String customStatusColorSkipped); String getCustomPageTitle(); void setCustomPageTitle(final String customPageTitle); void logProperties(); PluginSettings.StartPage getStartPage(); void setStartPage(final String startPage);  }