Package org.apache.rat.testhelpers.data
Class ReportTestDataProvider
java.lang.Object
org.apache.rat.testhelpers.data.AbstractTestDataProvider
org.apache.rat.testhelpers.data.ReportTestDataProvider
Generates a list of TestData for executing the Report.
The tests work by creating a Path Consumer to construct a directory under the test base directory and creating files and/or
directories within that directory. A test validator is created to validate the expected results of the operation and a
Each
These tests generally validate the results in the generated XML are as expected.
TestData
object is created for each test.
Each
TestData represents a single test of a command line option or set of options.
These tests generally validate the results in the generated XML are as expected.
-
Field Summary
FieldsFields inherited from class org.apache.rat.testhelpers.data.AbstractTestDataProvider
NO_OPTIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.CONFIGURATIONtests.protected voidconfigurationNoDefaultsTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.CONFIGURATION_NO_DEFAULTStests.protected voidcounterMaxTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.COUNTER_MAXtests.protected voidcounterMinTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.COUNTER_MINtests.protected voiddryRunTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.DRY_RUNtests.protected voideditCopyrightTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EDIT_COPYRIGHTtests.protected voideditLicenseTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EDIT_ADDtests.protected voideditOverwriteTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EDIT_OVERWRITEtests.execLicensesApprovedTest(org.apache.commons.cli.Option option, String[] args, Consumer<Path> extraSetup) protected voidhelpLicenses(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.HELP_LICENSEStests.protected voidinputExcludeFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EXCLUDE_FILEtests.protected voidinputExcludeParsedScmTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EXCLUDE_PARSE_SCMtests.protected voidinputExcludeSizeTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EXCLUDE_SIZEtests.protected voidinputExcludeStdTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EXCLUDE_STDtests.protected voidinputExcludeTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.EXCLUDEtests.protected voidinputIncludeFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.INCLUDE_FILEtests.protected voidinputIncludeStdTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.INCLUDE_STDtests.protected voidinputIncludeTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.INCLUDEtests.protected voidinputSourceTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.SOURCEtests.protected voidlicenseFamiliesApprovedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.FAMILIES_APPROVED_FILEtests.protected voidlicenseFamiliesApprovedTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.FAMILIES_APPROVEDtests.protected voidlicenseFamiliesDeniedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.FAMILIES_DENIED_FILEtests.protected voidlicenseFamiliesDeniedTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.FAMILIES_DENIEDtests.protected voidlicensesApprovedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.LICENSES_APPROVED_FILEtests.protected voidlicensesApprovedTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.LICENSES_APPROVEDtests.protected voidlicensesDeniedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.LICENSES_DENIED_FILEtests.protected voidlicensesDeniedTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.LICENSES_DENIEDtests.protected voidlogLevelTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.LOG_LEVELtests.protected voidoutputArchiveTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_ARCHIVEtests.protected voidoutputFamiliesTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_FAMILIEStests.protected voidoutputFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_FILEtests.protected voidoutputLicensesTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_LICENSEStests.protected voidoutputStandardTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_STANDARDtests.protected voidoutputStyleTest(Set<TestData> result, org.apache.commons.cli.Option option) Execute anArg.OUTPUT_STYLEtests.Methods inherited from class org.apache.rat.testhelpers.data.AbstractTestDataProvider
getOptionTestMap, getOptionTests
-
Field Details
-
NO_LICENSES_EXCEPTION
-
-
Constructor Details
-
ReportTestDataProvider
public ReportTestDataProvider()
-
-
Method Details
-
inputExcludeFileTest
Description copied from class:AbstractTestDataProviderExecute anArg.EXCLUDE_FILEtests.- Specified by:
inputExcludeFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputExcludeTest
Description copied from class:AbstractTestDataProviderExecute anArg.EXCLUDEtests.- Specified by:
inputExcludeTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputExcludeStdTest
Description copied from class:AbstractTestDataProviderExecute anArg.EXCLUDE_STDtests.- Specified by:
inputExcludeStdTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputExcludeParsedScmTest
protected void inputExcludeParsedScmTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.EXCLUDE_PARSE_SCMtests.- Specified by:
inputExcludeParsedScmTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputExcludeSizeTest
Description copied from class:AbstractTestDataProviderExecute anArg.EXCLUDE_SIZEtests.- Specified by:
inputExcludeSizeTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputIncludeFileTest
Description copied from class:AbstractTestDataProviderExecute anArg.INCLUDE_FILEtests.- Specified by:
inputIncludeFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputIncludeTest
Description copied from class:AbstractTestDataProviderExecute anArg.INCLUDEtests.- Specified by:
inputIncludeTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputIncludeStdTest
Description copied from class:AbstractTestDataProviderExecute anArg.INCLUDE_STDtests.- Specified by:
inputIncludeStdTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
inputSourceTest
Description copied from class:AbstractTestDataProviderExecute anArg.SOURCEtests.- Specified by:
inputSourceTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
execLicensesApprovedTest
-
helpLicenses
Description copied from class:AbstractTestDataProviderExecute anArg.HELP_LICENSEStests.- Specified by:
helpLicensesin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licensesApprovedFileTest
Description copied from class:AbstractTestDataProviderExecute anArg.LICENSES_APPROVED_FILEtests.- Specified by:
licensesApprovedFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licensesApprovedTest
Description copied from class:AbstractTestDataProviderExecute anArg.LICENSES_APPROVEDtests.- Specified by:
licensesApprovedTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licensesDeniedTest
Description copied from class:AbstractTestDataProviderExecute anArg.LICENSES_DENIEDtests.- Specified by:
licensesDeniedTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licensesDeniedFileTest
Description copied from class:AbstractTestDataProviderExecute anArg.LICENSES_DENIED_FILEtests.- Specified by:
licensesDeniedFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licenseFamiliesApprovedFileTest
protected void licenseFamiliesApprovedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.FAMILIES_APPROVED_FILEtests.- Specified by:
licenseFamiliesApprovedFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licenseFamiliesApprovedTest
protected void licenseFamiliesApprovedTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.FAMILIES_APPROVEDtests.- Specified by:
licenseFamiliesApprovedTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licenseFamiliesDeniedFileTest
protected void licenseFamiliesDeniedFileTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.FAMILIES_DENIED_FILEtests.- Specified by:
licenseFamiliesDeniedFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
licenseFamiliesDeniedTest
protected void licenseFamiliesDeniedTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.FAMILIES_DENIEDtests.- Specified by:
licenseFamiliesDeniedTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
counterMaxTest
Description copied from class:AbstractTestDataProviderExecute anArg.COUNTER_MAXtests.- Specified by:
counterMaxTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
counterMinTest
Description copied from class:AbstractTestDataProviderExecute anArg.COUNTER_MINtests.- Specified by:
counterMinTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
configTest
Description copied from class:AbstractTestDataProviderExecute anArg.CONFIGURATIONtests.- Specified by:
configTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
configurationNoDefaultsTest
protected void configurationNoDefaultsTest(Set<TestData> result, org.apache.commons.cli.Option option) Description copied from class:AbstractTestDataProviderExecute anArg.CONFIGURATION_NO_DEFAULTStests.- Specified by:
configurationNoDefaultsTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
dryRunTest
Description copied from class:AbstractTestDataProviderExecute anArg.DRY_RUNtests.- Specified by:
dryRunTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
editCopyrightTest
Description copied from class:AbstractTestDataProviderExecute anArg.EDIT_COPYRIGHTtests.- Specified by:
editCopyrightTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
editLicenseTest
Description copied from class:AbstractTestDataProviderExecute anArg.EDIT_ADDtests.- Specified by:
editLicenseTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
editOverwriteTest
Description copied from class:AbstractTestDataProviderExecute anArg.EDIT_OVERWRITEtests.- Specified by:
editOverwriteTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
logLevelTest
Description copied from class:AbstractTestDataProviderExecute anArg.LOG_LEVELtests.- Specified by:
logLevelTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputArchiveTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_ARCHIVEtests.- Specified by:
outputArchiveTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputFamiliesTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_FAMILIEStests.- Specified by:
outputFamiliesTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputFileTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_FILEtests.- Specified by:
outputFileTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputLicensesTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_LICENSEStests.- Specified by:
outputLicensesTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputStandardTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_STANDARDtests.- Specified by:
outputStandardTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-
outputStyleTest
Description copied from class:AbstractTestDataProviderExecute anArg.OUTPUT_STYLEtests.- Specified by:
outputStyleTestin classAbstractTestDataProvider- Parameters:
result- the set of configured tests.option- the specific option being tested.
-