org.apache.tinkerpop.gremlin.algorithm.generator

## Class AbstractGeneratorTest

- java.lang.Object
- - org.apache.tinkerpop.gremlin.AbstractGremlinTest
  - - org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGeneratorTest

- Direct Known Subclasses:
    CommunityGeneratorTest.DifferentDistributionsTest, DistributionGeneratorTest.DifferentDistributionsTest

      public class AbstractGeneratorTest
      extends AbstractGremlinTest

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.AbstractGremlinTest

      `config, g, graph, graphProvider, name, shouldTestIteratorLeak`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractGeneratorTest()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `same(Graph g1, Graph g2)` Asserts that two graphs are the "same" in way of structure.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.AbstractGremlinTest

      `afterLoadGraphWith, assertVertexEdgeCounts, beforeLoadGraphWith, convertToEdge, convertToEdgeId, convertToEdgeId, convertToVertex, convertToVertex, convertToVertexId, convertToVertexId, convertToVertexProperty, convertToVertexPropertyId, convertToVertexPropertyId, getAssertVertexEdgeCounts, printTraversalForm, setup, tearDown, tryCommit, tryCommit, tryRollback, validateException`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractGeneratorTest

          public AbstractGeneratorTest()

  - ### Method Detail

    - #### same

          protected boolean same(Graph g1,
                                 Graph g2)

      Asserts that two graphs are the "same" in way of structure. It assumes that the graphs both have vertices with an "oid" property that is an Integer value. It iterates each vertex in graph 1, using the "oid" to lookup vertices in graph 2. For each one found it checks both IN and OUT vertices to ensure that they attach to the same IN/OUT vertices given their "oid" properties.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.