Interface ILicenseTester
- All Known Implementing Classes:
LicenseTester,SimpleLicenseTester
public interface ILicenseTester
Interface for license testers
- Author:
- Gary O'Neall
-
Method Summary
Modifier and Type Method Description StringgetExceptionTestText(String licenseExceptionId)StringgetLicenseTestText(String licenseId)List<String>testException(org.spdx.library.model.license.LicenseException exception)Test exception against the test files directoryList<String>testLicense(org.spdx.library.model.license.License license)Test a license against the license test files
-
Method Details
-
testException
List<String> testException(org.spdx.library.model.license.LicenseException exception) throws IOException, org.spdx.library.InvalidSPDXAnalysisExceptionTest exception against the test files directory- Parameters:
exception-- Returns:
- Throws:
IOExceptionorg.spdx.library.InvalidSPDXAnalysisException
-
testLicense
List<String> testLicense(org.spdx.library.model.license.License license) throws IOException, org.spdx.utility.compare.SpdxCompareException, org.spdx.library.InvalidSPDXAnalysisExceptionTest a license against the license test files- Parameters:
license- license to test- Returns:
- list of test failure descriptions. List is empty if all tests pass.
- Throws:
IOExceptionorg.spdx.utility.compare.SpdxCompareExceptionorg.spdx.library.InvalidSPDXAnalysisException
-
getLicenseTestText
- Parameters:
licenseId-- Returns:
- text for the test for a license ID, null if no license text is found
- Throws:
IOException
-
getExceptionTestText
- Parameters:
licenseExceptionId-- Returns:
- text for the test for a exception ID, null if no license text is found
- Throws:
IOException
-