This is an automated email from the ASF dual-hosted git repository. Cole-Greer pushed a commit to branch simplePDT in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 66d91289086255ab1348d11bfd5fe712aab4b940 Author: Cole Greer <[email protected]> AuthorDate: Thu Jun 25 12:46:59 2026 -0700 cleanup dotnet tests --- .../Driver/DriverRemoteConnectionTests.cs | 74 ++++++++++------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs index e28742bef2..38946df417 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs @@ -156,43 +156,6 @@ public class DriverRemoteConnectionTests Assert.Equal(7, result.Y); } - #region Test helpers - - private class TestPointClass - { - public int X { get; set; } - public int Y { get; set; } - } - - private class TestPointAdapter : IProviderDefinedTypeAdapter<TestPointClass> - { - public string TypeName => "TestPoint"; - - public TestPointClass FromFields(IReadOnlyDictionary<string, object?> fields) - { - return new TestPointClass - { - X = Convert.ToInt32(fields["x"]), - Y = Convert.ToInt32(fields["y"]) - }; - } - - public IReadOnlyDictionary<string, object?> ToFields(TestPointClass obj) - { - return new ReadOnlyDictionary<string, object?>( - new Dictionary<string, object?> { { "x", obj.X }, { "y", obj.Y } }); - } - } - - [ProviderDefined(Name = "TestPoint")] - private class AnnotatedTestPoint - { - public int X { get; set; } - public int Y { get; set; } - } - - #endregion - [Fact] public void ShouldRoundTripPrimitivePdtViaTraversalApi() { @@ -231,7 +194,40 @@ public class DriverRemoteConnectionTests Assert.Equal(42u, (uint)results[0]); } - #region Test helpers (primitive) + #region Test helpers + + private class TestPointClass + { + public int X { get; set; } + public int Y { get; set; } + } + + private class TestPointAdapter : IProviderDefinedTypeAdapter<TestPointClass> + { + public string TypeName => "TestPoint"; + + public TestPointClass FromFields(IReadOnlyDictionary<string, object?> fields) + { + return new TestPointClass + { + X = Convert.ToInt32(fields["x"]), + Y = Convert.ToInt32(fields["y"]) + }; + } + + public IReadOnlyDictionary<string, object?> ToFields(TestPointClass obj) + { + return new ReadOnlyDictionary<string, object?>( + new Dictionary<string, object?> { { "x", obj.X }, { "y", obj.Y } }); + } + } + + [ProviderDefined(Name = "TestPoint")] + private class AnnotatedTestPoint + { + public int X { get; set; } + public int Y { get; set; } + } private class TestUint32Adapter : IPrimitivePdtAdapter<uint> { @@ -241,4 +237,4 @@ public class DriverRemoteConnectionTests } #endregion -} +} \ No newline at end of file
