Class 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:
    ProcessComputerSuite, ProcessStandardSuite, StructureIntegrateSuite, 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  AbstractGremlinSuite.OptOutTestFilter
      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.
    • Constructor Detail

      • 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 Detail

      • 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.