Interface ILicenseTester

All Known Implementing Classes:
CombinedLicenseTester, LicenseTester, SimpleLicenseTester

public interface ILicenseTester
Interface for license testers
Author:
Gary O'Neall
  • 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 compare
      org.spdx.core.InvalidSPDXAnalysisException - on error parsing SPDX licenses
    • getLicenseTestText

      @Nullable String getLicenseTestText(String licenseId) throws IOException
      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

      @Nullable String getExceptionTestText(String licenseExceptionId) throws IOException
      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)