Class TestCaseType

java.lang.Object
org.topbraid.shacl.testcases.TestCaseType
Direct Known Subclasses:
FunctionTestCaseType, GraphValidationTestCaseType, JSTestCaseType, QueryTestCaseType

public abstract class TestCaseType extends Object
An abstract class to hook types of test cases into the TopBraid Test Cases framework.
Author:
Holger Knublauch
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestCaseType(org.apache.jena.rdf.model.Resource testCaseClass)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract TestCase
    createTestCase(org.apache.jena.rdf.model.Resource graph, org.apache.jena.rdf.model.Resource resource)
     
    protected boolean
    filterTestCase(org.apache.jena.rdf.model.Resource possibleTestCase)
    Can be overridden to check the properties of the resource and return false if it is to be excluded from the list of cases to test.
    getTestCases(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource graph)
    Gets all test case resources from a given Model that this type can handle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestCaseType

      public TestCaseType(org.apache.jena.rdf.model.Resource testCaseClass)
  • Method Details

    • filterTestCase

      protected boolean filterTestCase(org.apache.jena.rdf.model.Resource possibleTestCase)
      Can be overridden to check the properties of the resource and return false if it is to be excluded from the list of cases to test.
    • createTestCase

      protected abstract TestCase createTestCase(org.apache.jena.rdf.model.Resource graph, org.apache.jena.rdf.model.Resource resource)
    • getTestCases

      public Collection<TestCase> getTestCases(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource graph)
      Gets all test case resources from a given Model that this type can handle.
      Parameters:
      model - the Model containing the test case
      graph - the URI resource of model
      Returns:
      the rest cases