TINKERPOP-1919 Merge classes P and TraversalPredicate

There is no good reason to keep those two classes separate anymore and
having P as the type for step parameters is probably easier to
understand for users than TraversalPredicate.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/359b08cc
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/359b08cc
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/359b08cc

Branch: refs/heads/TINKERPOP-1919
Commit: 359b08cc79ed89cab1fbc4e2b0b69b94a4e9cd06
Parents: 5049339
Author: Florian Hockmann <f...@florian-hockmann.de>
Authored: Mon Mar 12 21:16:18 2018 +0100
Committer: Florian Hockmann <f...@florian-hockmann.de>
Committed: Tue Mar 13 22:12:31 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 gremlin-dotnet/glv/P.template                   |  62 ++++++++++-
 gremlin-dotnet/glv/generate.groovy              |   2 +-
 .../Process/Traversal/GraphTraversal.cs         |  20 ++--
 .../src/Gremlin.Net/Process/Traversal/P.cs      | 106 ++++++++++++++-----
 .../Process/Traversal/TraversalPredicate.cs     |  85 ---------------
 .../src/Gremlin.Net/Process/Traversal/__.cs     |  20 ++--
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |   2 +-
 .../Structure/IO/GraphSON/PSerializer.cs        |  45 ++++++++
 .../IO/GraphSON/TraversalPredicateSerializer.cs |  45 --------
 .../Gherkin/GherkinTestRunner.cs                |  18 +---
 .../Gherkin/IgnoreException.cs                  |   5 -
 .../Gherkin/TraversalEvaluation/PParameter.cs   |  97 +++++++++++++++++
 .../TraversalEvaluationTests.cs                 |   2 +-
 .../TraversalEvaluation/TraversalParser.cs      |   2 +-
 .../TraversalPredicateParameter.cs              |  93 ----------------
 .../GraphSON/BytecodeGraphSONSerializerTests.cs |   2 +-
 .../IO/GraphSON/GraphSONWriterTests.cs          |   4 +-
 18 files changed, 311 insertions(+), 300 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 58c4dd0..97b90a5 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -43,6 +43,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed a bug in Gremlin Console which prevented handling of `gremlin.sh` 
flags that had an "=" between the flag and its arguments.
 * Fixed bug where `SparkMessenger` was not applying the `edgeFunction` from 
`MessageScope`.
 * Fixed a bug in `ComputerAwareStep` that didn't handle `reset()` properly and 
thus occasionally produced some extra traversers.
+* Removed `TraversalPredicate` class in Gremlin.Net. It is now included in the 
`P` class instead.
 
 [[release-3-2-7]]
 === TinkerPop 3.2.7 (Release Date: December 17, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/glv/P.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/P.template b/gremlin-dotnet/glv/P.template
index f337127..ad037c1 100644
--- a/gremlin-dotnet/glv/P.template
+++ b/gremlin-dotnet/glv/P.template
@@ -30,20 +30,72 @@ namespace Gremlin.Net.Process.Traversal
     ///     A <see cref="P" /> is a predicate of the form Func&lt;object, 
bool&gt;.
     ///     That is, given some object, return true or false.
     /// </summary>
-    public class P
+    public class P : IPredicate
     {
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="P" /> class.
+        /// </summary>
+        /// <param name="operatorName">The name of the predicate.</param>
+        /// <param name="value">The value of the predicate.</param>
+        /// <param name="other">An optional other predicate that is used as an 
argument for this predicate.</param>
+        public P(string operatorName, dynamic value, P other = null)
+        {
+            OperatorName = operatorName;
+            Value = value;
+            Other = other;
+        }
+
+        /// <summary>
+        ///     Gets the name of the predicate.
+        /// </summary>
+        public string OperatorName { get; }
+
+        /// <summary>
+        ///     Gets the value of the predicate.
+        /// </summary>
+        public dynamic Value { get; }
+
+        /// <summary>
+        ///     Gets an optional other predicate that is used as an argument 
for this predicate.
+        /// </summary>
+        public P Other { get; }
+
+        /// <summary>
+        ///     Returns a composed predicate that represents a logical AND of 
this predicate and another.
+        /// </summary>
+        /// <param name="otherPredicate">A predicate that will be 
logically-ANDed with this predicate.</param>
+        /// <returns>The composed predicate.</returns>
+        public P And(P otherPredicate)
+        {
+            return new P("and", this, otherPredicate);
+        }
+
+        /// <summary>
+        ///     Returns a composed predicate that represents a logical OR of 
this predicate and another.
+        /// </summary>
+        /// <param name="otherPredicate">A predicate that will be 
logically-ORed with this predicate.</param>
+        /// <returns>The composed predicate.</returns>
+        public P Or(P otherPredicate)
+        {
+            return new P("or", this, otherPredicate);
+        }
 <% pmethods.findAll{ !(it in ["within", "without"]) }.each { method -> %>
-        public static TraversalPredicate <%= toCSharpMethodName.call(method) 
%>(params object[] args)
+        public static P <%= toCSharpMethodName.call(method) %>(params object[] 
args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("<%= method %>", value);
+            return new P("<%= method %>", value);
         }
 <% } %><% pmethods.findAll{ it in ["within", "without"] }.each { method -> %>
-        public static TraversalPredicate <%= toCSharpMethodName.call(method) 
%>(params object[] args)
+        public static P <%= toCSharpMethodName.call(method) %>(params object[] 
args)
         {
-            return new TraversalPredicate("<%= method %>", args);
+            return new P("<%= method %>", args);
         }
 <% } %>
+        /// <inheritdoc />
+        public override string ToString()
+        {
+            return Other == null ? \$"{OperatorName}({Value})" : 
\$"{OperatorName}({Value},{Other})";
+        }
     }
 
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy 
b/gremlin-dotnet/glv/generate.groovy
index 0404307..5057ff8 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -49,7 +49,7 @@ def toCSharpTypeMap = ["Long": "long",
                        "Traversal": "ITraversal",
                        "Traversal[]": "ITraversal[]",
                        "Predicate": "IPredicate",
-                       "P": "TraversalPredicate",
+                       "P": "P",
                        "TraversalStrategy": "ITraversalStrategy",
                        "TraversalStrategy[]": "ITraversalStrategy[]",
                        "Function": "IFunction",

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index 7100ea3..c8708df 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -667,7 +667,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Has (string propertyKey, 
TraversalPredicate predicate)
+        public GraphTraversal<S, E> Has (string propertyKey, P predicate)
         {
             Bytecode.AddStep("has", propertyKey, predicate);
             return Wrap<S, E>(this);
@@ -685,7 +685,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Has (string label, string propertyKey, 
TraversalPredicate predicate)
+        public GraphTraversal<S, E> Has (string label, string propertyKey, P 
predicate)
         {
             Bytecode.AddStep("has", label, propertyKey, predicate);
             return Wrap<S, E>(this);
@@ -712,7 +712,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Has (T accessor, TraversalPredicate 
predicate)
+        public GraphTraversal<S, E> Has (T accessor, P predicate)
         {
             Bytecode.AddStep("has", accessor, predicate);
             return Wrap<S, E>(this);
@@ -741,7 +741,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasId step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> HasId (TraversalPredicate predicate)
+        public GraphTraversal<S, E> HasId (P predicate)
         {
             Bytecode.AddStep("hasId", predicate);
             return Wrap<S, E>(this);
@@ -750,7 +750,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasKey step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> HasKey (TraversalPredicate predicate)
+        public GraphTraversal<S, E> HasKey (P predicate)
         {
             Bytecode.AddStep("hasKey", predicate);
             return Wrap<S, E>(this);
@@ -770,7 +770,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasLabel step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> HasLabel (TraversalPredicate predicate)
+        public GraphTraversal<S, E> HasLabel (P predicate)
         {
             Bytecode.AddStep("hasLabel", predicate);
             return Wrap<S, E>(this);
@@ -810,7 +810,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasValue step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> HasValue (TraversalPredicate predicate)
+        public GraphTraversal<S, E> HasValue (P predicate)
         {
             Bytecode.AddStep("hasValue", predicate);
             return Wrap<S, E>(this);
@@ -888,7 +888,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the is step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Is (TraversalPredicate predicate)
+        public GraphTraversal<S, E> Is (P predicate)
         {
             Bytecode.AddStep("is", predicate);
             return Wrap<S, E>(this);
@@ -1660,7 +1660,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the where step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Where (TraversalPredicate predicate)
+        public GraphTraversal<S, E> Where (P predicate)
         {
             Bytecode.AddStep("where", predicate);
             return Wrap<S, E>(this);
@@ -1669,7 +1669,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the where step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Where (string startKey, TraversalPredicate 
predicate)
+        public GraphTraversal<S, E> Where (string startKey, P predicate)
         {
             Bytecode.AddStep("where", startKey, predicate);
             return Wrap<S, E>(this);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
index 0a7809f..e3a1e76 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
@@ -30,85 +30,137 @@ namespace Gremlin.Net.Process.Traversal
     ///     A <see cref="P" /> is a predicate of the form Func&lt;object, 
bool&gt;.
     ///     That is, given some object, return true or false.
     /// </summary>
-    public class P
+    public class P : IPredicate
     {
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="P" /> class.
+        /// </summary>
+        /// <param name="operatorName">The name of the predicate.</param>
+        /// <param name="value">The value of the predicate.</param>
+        /// <param name="other">An optional other predicate that is used as an 
argument for this predicate.</param>
+        public P(string operatorName, dynamic value, P other = null)
+        {
+            OperatorName = operatorName;
+            Value = value;
+            Other = other;
+        }
+
+        /// <summary>
+        ///     Gets the name of the predicate.
+        /// </summary>
+        public string OperatorName { get; }
+
+        /// <summary>
+        ///     Gets the value of the predicate.
+        /// </summary>
+        public dynamic Value { get; }
+
+        /// <summary>
+        ///     Gets an optional other predicate that is used as an argument 
for this predicate.
+        /// </summary>
+        public P Other { get; }
+
+        /// <summary>
+        ///     Returns a composed predicate that represents a logical AND of 
this predicate and another.
+        /// </summary>
+        /// <param name="otherPredicate">A predicate that will be 
logically-ANDed with this predicate.</param>
+        /// <returns>The composed predicate.</returns>
+        public P And(P otherPredicate)
+        {
+            return new P("and", this, otherPredicate);
+        }
 
-        public static TraversalPredicate Between(params object[] args)
+        /// <summary>
+        ///     Returns a composed predicate that represents a logical OR of 
this predicate and another.
+        /// </summary>
+        /// <param name="otherPredicate">A predicate that will be 
logically-ORed with this predicate.</param>
+        /// <returns>The composed predicate.</returns>
+        public P Or(P otherPredicate)
+        {
+            return new P("or", this, otherPredicate);
+        }
+
+        public static P Between(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("between", value);
+            return new P("between", value);
         }
 
-        public static TraversalPredicate Eq(params object[] args)
+        public static P Eq(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("eq", value);
+            return new P("eq", value);
         }
 
-        public static TraversalPredicate Gt(params object[] args)
+        public static P Gt(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("gt", value);
+            return new P("gt", value);
         }
 
-        public static TraversalPredicate Gte(params object[] args)
+        public static P Gte(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("gte", value);
+            return new P("gte", value);
         }
 
-        public static TraversalPredicate Inside(params object[] args)
+        public static P Inside(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("inside", value);
+            return new P("inside", value);
         }
 
-        public static TraversalPredicate Lt(params object[] args)
+        public static P Lt(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("lt", value);
+            return new P("lt", value);
         }
 
-        public static TraversalPredicate Lte(params object[] args)
+        public static P Lte(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("lte", value);
+            return new P("lte", value);
         }
 
-        public static TraversalPredicate Neq(params object[] args)
+        public static P Neq(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("neq", value);
+            return new P("neq", value);
         }
 
-        public static TraversalPredicate Not(params object[] args)
+        public static P Not(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("not", value);
+            return new P("not", value);
         }
 
-        public static TraversalPredicate Outside(params object[] args)
+        public static P Outside(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("outside", value);
+            return new P("outside", value);
         }
 
-        public static TraversalPredicate Test(params object[] args)
+        public static P Test(params object[] args)
         {
             var value = args.Length == 1 ? args[0] : args;
-            return new TraversalPredicate("test", value);
+            return new P("test", value);
         }
 
-        public static TraversalPredicate Within(params object[] args)
+        public static P Within(params object[] args)
         {
-            return new TraversalPredicate("within", args);
+            return new P("within", args);
         }
 
-        public static TraversalPredicate Without(params object[] args)
+        public static P Without(params object[] args)
         {
-            return new TraversalPredicate("without", args);
+            return new P("without", args);
         }
 
+        /// <inheritdoc />
+        public override string ToString()
+        {
+            return Other == null ? $"{OperatorName}({Value})" : 
$"{OperatorName}({Value},{Other})";
+        }
     }
 
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
deleted file mode 100644
index e8b5be8..0000000
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-namespace Gremlin.Net.Process.Traversal
-{
-    /// <summary>
-    ///     Represents a predicate (boolean-valued function) used in a <see 
cref="ITraversal" />.
-    /// </summary>
-    public class TraversalPredicate : IPredicate
-    {
-        /// <summary>
-        ///     Initializes a new instance of the <see 
cref="TraversalPredicate" /> class.
-        /// </summary>
-        /// <param name="operatorName">The name of the predicate.</param>
-        /// <param name="value">The value of the predicate.</param>
-        /// <param name="other">An optional other predicate that is used as an 
argument for this predicate.</param>
-        public TraversalPredicate(string operatorName, dynamic value, 
TraversalPredicate other = null)
-        {
-            OperatorName = operatorName;
-            Value = value;
-            Other = other;
-        }
-
-        /// <summary>
-        ///     Gets the name of the predicate.
-        /// </summary>
-        public string OperatorName { get; }
-
-        /// <summary>
-        ///     Gets the value of the predicate.
-        /// </summary>
-        public dynamic Value { get; }
-
-        /// <summary>
-        ///     Gets an optional other predicate that is used as an argument 
for this predicate.
-        /// </summary>
-        public TraversalPredicate Other { get; }
-
-        /// <summary>
-        ///     Returns a composed predicate that represents a logical AND of 
this predicate and another.
-        /// </summary>
-        /// <param name="otherPredicate">A predicate that will be 
logically-ANDed with this predicate.</param>
-        /// <returns>The composed predicate.</returns>
-        public TraversalPredicate And(TraversalPredicate otherPredicate)
-        {
-            return new TraversalPredicate("and", this, otherPredicate);
-        }
-
-        /// <summary>
-        ///     Returns a composed predicate that represents a logical OR of 
this predicate and another.
-        /// </summary>
-        /// <param name="otherPredicate">A predicate that will be 
logically-ORed with this predicate.</param>
-        /// <returns>The composed predicate.</returns>
-        public TraversalPredicate Or(TraversalPredicate otherPredicate)
-        {
-            return new TraversalPredicate("or", this, otherPredicate);
-        }
-
-        /// <inheritdoc />
-        public override string ToString()
-        {
-            return Other == null ? $"{OperatorName}({Value})" : 
$"{OperatorName}({Value},{Other})";
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index 9620e7f..46f510a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -485,7 +485,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the has step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Has(string propertyKey, 
TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Has(string propertyKey, P 
predicate)
         {
             return new GraphTraversal<object, object>().Has(propertyKey, 
predicate);            
         }
@@ -501,7 +501,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the has step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Has(string label, string 
propertyKey, TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Has(string label, string 
propertyKey, P predicate)
         {
             return new GraphTraversal<object, object>().Has(label, 
propertyKey, predicate);            
         }
@@ -525,7 +525,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the has step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Has(T accessor, 
TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Has(T accessor, P 
predicate)
         {
             return new GraphTraversal<object, object>().Has(accessor, 
predicate);            
         }
@@ -551,7 +551,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the hasId step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> HasId(TraversalPredicate 
predicate)
+        public static GraphTraversal<object, object> HasId(P predicate)
         {
             return new GraphTraversal<object, object>().HasId(predicate);      
      
         }
@@ -559,7 +559,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the hasKey step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> HasKey(TraversalPredicate 
predicate)
+        public static GraphTraversal<object, object> HasKey(P predicate)
         {
             return new GraphTraversal<object, object>().HasKey(predicate);     
       
         }
@@ -577,7 +577,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the hasLabel step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> 
HasLabel(TraversalPredicate predicate)
+        public static GraphTraversal<object, object> HasLabel(P predicate)
         {
             return new GraphTraversal<object, object>().HasLabel(predicate);   
         
         }
@@ -613,7 +613,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the hasValue step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> 
HasValue(TraversalPredicate predicate)
+        public static GraphTraversal<object, object> HasValue(P predicate)
         {
             return new GraphTraversal<object, object>().HasValue(predicate);   
         
         }
@@ -683,7 +683,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the is step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Is(TraversalPredicate 
predicate)
+        public static GraphTraversal<object, object> Is(P predicate)
         {
             return new GraphTraversal<object, object>().Is(predicate);         
   
         }
@@ -1293,7 +1293,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the where step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Where(TraversalPredicate 
predicate)
+        public static GraphTraversal<object, object> Where(P predicate)
         {
             return new GraphTraversal<object, object>().Where(predicate);      
      
         }
@@ -1301,7 +1301,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds 
the where step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Where(string startKey, 
TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Where(string startKey, P 
predicate)
         {
             return new GraphTraversal<object, object>().Where(startKey, 
predicate);            
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs 
b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index d5b7acc..f23d80d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -54,7 +54,7 @@ namespace Gremlin.Net.Structure.IO.GraphSON
                 {typeof(DateTimeOffset), new DateSerializer()},
                 {typeof(Type), new ClassSerializer()},
                 {typeof(EnumWrapper), new EnumSerializer()},
-                {typeof(TraversalPredicate), new 
TraversalPredicateSerializer()},
+                {typeof(P), new PSerializer()},
                 {typeof(Vertex), new VertexSerializer()},
                 {typeof(Edge), new EdgeSerializer()},
                 {typeof(Property), new PropertySerializer()},

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PSerializer.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PSerializer.cs 
b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PSerializer.cs
new file mode 100644
index 0000000..46facda
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PSerializer.cs
@@ -0,0 +1,45 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+using System.Collections.Generic;
+using Gremlin.Net.Process.Traversal;
+
+namespace Gremlin.Net.Structure.IO.GraphSON
+{
+    internal class PSerializer : IGraphSONSerializer
+    {
+        public Dictionary<string, dynamic> Dictify(dynamic predicate, 
GraphSONWriter writer)
+        {
+            P p = predicate;
+            var value = p.Other == null
+                ? writer.ToDict(p.Value)
+                : new List<dynamic> {writer.ToDict(p.Value), 
writer.ToDict(p.Other)};
+            var dict = new Dictionary<string, dynamic>
+            {
+                {"predicate", p.OperatorName},
+                {"value", value}
+            };
+            return GraphSONUtil.ToTypedValue("P", dict);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TraversalPredicateSerializer.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TraversalPredicateSerializer.cs
 
b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TraversalPredicateSerializer.cs
deleted file mode 100644
index 937cb90..0000000
--- 
a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TraversalPredicateSerializer.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System.Collections.Generic;
-using Gremlin.Net.Process.Traversal;
-
-namespace Gremlin.Net.Structure.IO.GraphSON
-{
-    internal class TraversalPredicateSerializer : IGraphSONSerializer
-    {
-        public Dictionary<string, dynamic> Dictify(dynamic predicate, 
GraphSONWriter writer)
-        {
-            TraversalPredicate p = predicate;
-            var value = p.Other == null
-                ? writer.ToDict(p.Value)
-                : new List<dynamic> {writer.ToDict(p.Value), 
writer.ToDict(p.Other)};
-            var dict = new Dictionary<string, dynamic>
-            {
-                {"predicate", p.OperatorName},
-                {"value", value}
-            };
-            return GraphSONUtil.ToTypedValue("P", dict);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index d906357..c3819fe 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -43,23 +43,15 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                 {"g_V_hasIdXwithinXemptyXX_count", 
IgnoreReason.PWithinWrapsArgumentsInArray},
                 {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", 
IgnoreReason.PWithinWrapsArgumentsInArray},
                 {
-                    
"g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name",
-                    IgnoreReason.PNotCreatedCorrectlyByGherkinRunner
-                },
-                {
-                    
"g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX",
-                    IgnoreReason.PNotCreatedCorrectlyByGherkinRunner
-                },
-                {
-                    
"g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX",
-                    IgnoreReason.PNotCreatedCorrectlyByGherkinRunner
+                    
"g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX",
+                    IgnoreReason.PNotDeserializationProblem
                 },
                 {
-                    
"g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX",
-                    IgnoreReason.PNotCreatedCorrectlyByGherkinRunner
+                    
"g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name",
+                    IgnoreReason.PNotDeserializationProblem
                 },
                 {
-                    
"g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX",
+                    
"g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX",
                     IgnoreReason.PNotDeserializationProblem
                 }
             };

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index dae2ced..fd226bf 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -43,10 +43,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                 case IgnoreReason.LambdaNotSupported:
                     reasonSuffix = " because lambdas are not supported in 
Gremlin.NET (TINKERPOP-1854)";
                     break;
-                case IgnoreReason.PNotCreatedCorrectlyByGherkinRunner:
-                    reasonSuffix =
-                        " because the Gherkin runner can't call methods in 
TraversalPredicate class (TINKERPOP-1919)";
-                    break;
                 case IgnoreReason.PWithinWrapsArgumentsInArray:
                     reasonSuffix = " because P.Within() arguments are 
incorrectly wrapped in an array (TINKERPOP-1920)";
                     break;
@@ -61,7 +57,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     public enum IgnoreReason
     {
         LambdaNotSupported,
-        PNotCreatedCorrectlyByGherkinRunner,
         PWithinWrapsArgumentsInArray,
         PNotDeserializationProblem
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/PParameter.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/PParameter.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/PParameter.cs
new file mode 100644
index 0000000..b25faef
--- /dev/null
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/PParameter.cs
@@ -0,0 +1,97 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Dynamic;
+using System.Linq;
+using System.Reflection;
+using Gremlin.Net.Process.Traversal;
+
+namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
+{
+    /// <summary>
+    /// Represents a parameter for a traversal predicate (ie: P.gt())
+    /// </summary>
+    internal class PParameter : ITokenParameter, IEquatable<PParameter>
+    {
+        private IDictionary<string, object> _contextParameterValues;
+        public IList<Token> Tokens { get; }
+        
+        public PParameter(IList<Token> tokens)
+        {
+            Tokens = tokens;
+        }
+
+        public bool Equals(PParameter other)
+        {
+            return Tokens.SequenceEqual(other.Tokens);
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (ReferenceEquals(null, obj)) return false;
+            if (ReferenceEquals(this, obj)) return true;
+            if (obj.GetType() != GetType()) return false;
+            return Equals((PParameter) obj);
+        }
+
+        public override int GetHashCode()
+        {
+            return Tokens != null ? Tokens.GetHashCode() : 0;
+        }
+
+        public object GetValue()
+        {
+            var type = typeof(P);
+            object instance = null;
+            for (var i = 1; i < Tokens.Count; i++)
+            {
+                var token = Tokens[i];
+                token.SetContextParameterValues(_contextParameterValues);
+                var method = 
type.GetMethod(TraversalParser.GetCsharpName(token.Name),
+                    BindingFlags.Static | BindingFlags.Instance | 
BindingFlags.Public);
+                if (method == null)
+                {
+                    throw new InvalidOperationException($"Predicate (P) method 
'{token}' not found for testing");
+                }
+                
+                var parameters = method.IsStatic
+                    ? new object[] {token.Parameters.Select(p => 
p.GetValue()).ToArray()}
+                    : token.Parameters.Select(p => p.GetValue()).ToArray();
+                instance = method.Invoke(instance, parameters);
+            }
+            return instance;
+        }
+
+        public Type GetParameterType()
+        {
+            return typeof(P);
+        }
+
+        public void SetContextParameterValues(IDictionary<string, object> 
parameterValues)
+        {
+            _contextParameterValues = parameterValues;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEvaluationTests.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEvaluationTests.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEvaluationTests.cs
index 94a8c99..4e2bfff 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEvaluationTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEvaluationTests.cs
@@ -55,7 +55,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
                         new[] {new Token("__"), new Token("in", new 
StringParameter("knows"))}, "__.in(\"knows\")")})}),
                 Tuple.Create("g.V().has(\"age\",P.gt(27))", 
                     new[] {new Token("has", new ITokenParameter[] { new 
StringParameter("age"),
-                        new TraversalPredicateParameter(
+                        new PParameter(
                             new[] { new Token("P"), new Token("gt", 
LiteralParameter.Create(27)) }) })}),
                 Tuple.Create("g.V().count(Scope.local)", 
                     new[] { new Token("count", new 
TraversalEnumParameter("Scope.local"))}),

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
index 118fcea..11145da 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
@@ -406,7 +406,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             }
             if (text.Substring(i, 2).StartsWith("P."))
             {
-                return new TraversalPredicateParameter(ParseTokens(text, ref 
i));
+                return new PParameter(ParseTokens(text, ref i));
             }
             var parameterText = text.Substring(i, text.IndexOf(')', i) - i);
             var separatorIndex = parameterText.IndexOf(',');

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalPredicateParameter.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalPredicateParameter.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalPredicateParameter.cs
deleted file mode 100644
index 57262c1..0000000
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalPredicateParameter.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using Gremlin.Net.Process.Traversal;
-
-namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
-{
-    /// <summary>
-    /// Represents a parameter for a traversal predicate (ie: P.gt())
-    /// </summary>
-    internal class TraversalPredicateParameter : ITokenParameter, 
IEquatable<TraversalPredicateParameter>
-    {
-        private IDictionary<string, object> _contextParameterValues;
-        public IList<Token> Tokens { get; }
-        
-        public TraversalPredicateParameter(IList<Token> tokens)
-        {
-            Tokens = tokens;
-        }
-
-        public bool Equals(TraversalPredicateParameter other)
-        {
-            return Tokens.SequenceEqual(other.Tokens);
-        }
-
-        public override bool Equals(object obj)
-        {
-            if (ReferenceEquals(null, obj)) return false;
-            if (ReferenceEquals(this, obj)) return true;
-            if (obj.GetType() != GetType()) return false;
-            return Equals((TraversalPredicateParameter) obj);
-        }
-
-        public override int GetHashCode()
-        {
-            return Tokens != null ? Tokens.GetHashCode() : 0;
-        }
-
-        public object GetValue()
-        {
-            var type = typeof(P);
-            object instance = null;
-            for (var i = 1; i < Tokens.Count; i++)
-            {
-                var token = Tokens[i];
-                token.SetContextParameterValues(_contextParameterValues);
-                var method = 
type.GetMethod(TraversalParser.GetCsharpName(token.Name),
-                    BindingFlags.Static | BindingFlags.Public);
-                if (method == null)
-                {
-                    throw new InvalidOperationException($"Predicate (P) method 
'{token}' not found for testing");
-                }
-                instance = method.Invoke(instance,
-                    new object[] {token.Parameters.Select(p => 
p.GetValue()).ToArray()});
-            }
-            return instance;
-        }
-
-        public Type GetParameterType()
-        {
-            return typeof(TraversalPredicate);
-        }
-
-        public void SetContextParameterValues(IDictionary<string, object> 
parameterValues)
-        {
-            _contextParameterValues = parameterValues;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
index 8ed7a3d..568b970 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
@@ -118,7 +118,7 @@ namespace Gremlin.Net.UnitTest.Structure.IO.GraphSON
             bytecode.AddSource("withSideEffect", "a", new List<string> 
{"josh", "peter"});
             bytecode.AddStep("V", 1);
             bytecode.AddStep("values", "name");
-            bytecode.AddStep("where", new TraversalPredicate("within", "a"));
+            bytecode.AddStep("where", new P("within", "a"));
             var graphsonWriter = CreateGraphSONWriter();
 
             var graphSON = graphsonWriter.WriteObject(bytecode);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/359b08cc/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
index 3d02533..3e2d307 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
@@ -222,7 +222,7 @@ namespace Gremlin.Net.UnitTest.Structure.IO.GraphSON
         public void ShouldSerializePredicateWithTwoValues()
         {
             var writer = CreateStandardGraphSONWriter();
-            var predicate = new TraversalPredicate("within", new List<int> {1, 
2});
+            var predicate = new P("within", new List<int> {1, 2});
 
             var serializedPredicate = writer.WriteObject(predicate);
 
@@ -235,7 +235,7 @@ namespace Gremlin.Net.UnitTest.Structure.IO.GraphSON
         public void ShouldSerializePredicateWithSingleValue()
         {
             var writer = CreateStandardGraphSONWriter();
-            var predicate = new TraversalPredicate("lt", 5);
+            var predicate = new P("lt", 5);
 
             var serializedPredicate = writer.WriteObject(predicate);
 

Reply via email to