Class AbstractGremlinSuite

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runner.Runner>
org.junit.runners.Suite
org.apache.tinkerpop.gremlin.AbstractGremlinSuite
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable
Direct Known Subclasses:
ProcessEmbeddedComputerSuite, ProcessEmbeddedStandardSuite, StructureStandardSuite

public abstract class AbstractGremlinSuite extends org.junit.runners.Suite
Base Gremlin test suite from which different classes of tests can be exposed to implementers.
Author:
Stephen Mallette (http://stephen.genoprime.com)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Filter for tests in the suite which is controlled by the Graph.OptOut annotation.

    Nested classes/interfaces inherited from class org.junit.runners.Suite

    org.junit.runners.Suite.SuiteClasses
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractGremlinSuite(Class<?> klass, org.junit.runners.model.RunnerBuilder builder, Class<?>[] testsToExecute, Class<?>[] testsToEnforce, boolean gremlinFlavorSuite, TraversalEngine.Type traversalEngineType)
    Constructs a Gremlin Test Suite implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called just after test class execution.
    boolean
    Called just prior to test class execution.
    static org.javatuples.Pair<Class<? extends GraphProvider>,Class<? extends Graph>>
     
    protected void
    runChild(org.junit.runner.Runner runner, org.junit.runner.notification.RunNotifier notifier)
     
    protected org.junit.runners.model.Statement
    withAfterClasses(org.junit.runners.model.Statement statement)
     

    Methods inherited from class org.junit.runners.Suite

    describeChild, emptySuite, getChildren

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withBeforeClasses, withInterruptIsolation

    Methods inherited from class org.junit.runner.Runner

    testCount

    Methods inherited from class java.lang.Object

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

    • AbstractGremlinSuite

      public AbstractGremlinSuite(Class<?> klass, org.junit.runners.model.RunnerBuilder builder, Class<?>[] testsToExecute, Class<?>[] testsToEnforce, boolean gremlinFlavorSuite, TraversalEngine.Type traversalEngineType) throws org.junit.runners.model.InitializationError
      Constructs a Gremlin Test Suite implementation.
      Parameters:
      klass - Required for JUnit Suite construction
      builder - Required for JUnit Suite construction
      testsToExecute - The list of tests to execute
      testsToEnforce - The list of tests to "enforce" such that a check is made to ensure that in this list, there exists an implementation in the testsToExecute (use null for no enforcement).
      gremlinFlavorSuite - Ignore validation of Graph.OptIn annotations which is typically reserved for structure tests
      traversalEngineType - The TraversalEngine.Type to enforce on this suite
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • getGraphProviderClass

      public static org.javatuples.Pair<Class<? extends GraphProvider>,Class<? extends Graph>> getGraphProviderClass(Class<?> klass) throws org.junit.runners.model.InitializationError
      Throws:
      org.junit.runners.model.InitializationError
    • runChild

      protected void runChild(org.junit.runner.Runner runner, org.junit.runner.notification.RunNotifier notifier)
      Overrides:
      runChild in class org.junit.runners.Suite
    • withAfterClasses

      protected org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement)
      Overrides:
      withAfterClasses in class org.junit.runners.ParentRunner<org.junit.runner.Runner>
    • beforeTestExecution

      public boolean beforeTestExecution(Class<? extends AbstractGremlinTest> testClass)
      Called just prior to test class execution. Return false to ignore test class. By default this always returns true.
    • afterTestExecution

      public void afterTestExecution(Class<? extends AbstractGremlinTest> testClass)
      Called just after test class execution.