Interface ILicenseTester
- All Known Implementing Classes:
CombinedLicenseTester,LicenseTester,SimpleLicenseTester
public interface ILicenseTester
Interface for license testers
- Author:
- Gary O'Neall
-
Method Summary
Modifier and TypeMethodDescriptiongetExceptionTestText(String licenseExceptionId) getLicenseTestText(String licenseId) testException(ListedExceptionContainer exceptionContainer) Test exception against the test files directorytestLicense(ListedLicenseContainer licenseContainer) Test a license against the license test files
-
Method Details
-
testException
List<String> testException(ListedExceptionContainer exceptionContainer) throws IOException, org.spdx.core.InvalidSPDXAnalysisException Test exception against the test files directory- Parameters:
exceptionContainer- Exception to test- Returns:
- list of test failure descriptions. List is empty if all tests pass.
- Throws:
IOException- on I/O error reading test file(s)org.spdx.core.InvalidSPDXAnalysisException- on error parsing SPDX licenses
-
testLicense
List<String> testLicense(ListedLicenseContainer licenseContainer) throws IOException, org.spdx.utility.compare.SpdxCompareException, org.spdx.core.InvalidSPDXAnalysisException Test a license against the license test files- Parameters:
licenseContainer- license to test- Returns:
- list of test failure descriptions. List is empty if all tests pass.
- Throws:
IOException- on I/O error reading test file(s)org.spdx.utility.compare.SpdxCompareException- on error executing the compareorg.spdx.core.InvalidSPDXAnalysisException- on error parsing SPDX licenses
-
getLicenseTestText
- Parameters:
licenseId- license ID for the license text- Returns:
- text for the test for a license ID, null if no license text is found
- Throws:
IOException- on I/O error reading test file(s)
-
getExceptionTestText
- Parameters:
licenseExceptionId- license exception text- Returns:
- text for the test for an exception ID, null if no license text is found
- Throws:
IOException- on I/O error reading test file(s)
-