Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All the test classes can do without inheriting VerifyBase. #1905

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/Core.AspNet.Tests/GremlinqConfigurationSectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

namespace ExRam.Gremlinq.Core.AspNet.Tests
{
public class GremlinqConfigurationSectionTests : VerifyBase
public class GremlinqConfigurationSectionTests
{
private readonly IGremlinqConfigurationSection _section;

public GremlinqConfigurationSectionTests() : base()
public GremlinqConfigurationSectionTests()
{
var serviceCollection = new ServiceCollection()
.AddSingleton<IConfiguration>(new ConfigurationBuilder()
Expand Down
4 changes: 2 additions & 2 deletions test/Core.AspNet.Tests/ProviderConfigurationSectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace ExRam.Gremlinq.Core.AspNet.Tests
{
public class ProviderConfigurationSectionTests : VerifyBase
public class ProviderConfigurationSectionTests
{
private readonly IConfigurationRoot _configurationRoot;

Expand All @@ -12,7 +12,7 @@ private interface IMyProviderConfigurator : IGremlinqConfigurator<IMyProviderCon

}

public ProviderConfigurationSectionTests() : base()
public ProviderConfigurationSectionTests()
{
_configurationRoot = new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary<string, string?>
Expand Down
11 changes: 2 additions & 9 deletions test/Core.Tests/BytecodeExtensionsTest.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
using System.Collections.Immutable;

using ExRam.Gremlinq.Core.Serialization;
using ExRam.Gremlinq.Core.Serialization;
using Gremlin.Net.Process.Traversal;

namespace ExRam.Gremlinq.Core.Tests
{
public class BytecodeExtensionsTest : VerifyBase
public class BytecodeExtensionsTest
{
public BytecodeExtensionsTest() : base()
{

}

[Fact]
public Task GroovyExpression_is_handled_correctly()
{
Expand Down
6 changes: 1 addition & 5 deletions test/Core.Tests/FastImmutableListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class FastImmutableListTest : VerifyBase
public class FastImmutableListTest
{
public FastImmutableListTest() : base()
{
}

[Fact]
public void Concurrency()
{
Expand Down
7 changes: 1 addition & 6 deletions test/Core.Tests/GraphModelTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class GraphModelTest : VerifyBase
public class GraphModelTest
{
public GraphModelTest() : base()
{

}

[Fact]
public void Fody_works()
{
Expand Down
4 changes: 2 additions & 2 deletions test/Core.Tests/GremlinQueryExecutorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class GremlinQueryExecutorTest : VerifyBase
public class GremlinQueryExecutorTest
{
private readonly IVertexGremlinQuery<object> _query;

public GremlinQueryExecutorTest() : base()
public GremlinQueryExecutorTest()
{
_query = GremlinQuerySource.g.V();
}
Expand Down
4 changes: 2 additions & 2 deletions test/Core.Tests/GremlinQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class GremlinQueryTest : VerifyBase
public class GremlinQueryTest
{
private readonly IGremlinQuerySource _g;

public GremlinQueryTest() : base()
public GremlinQueryTest()
{
_g = g
.ConfigureEnvironment(_ => _
Expand Down
4 changes: 2 additions & 2 deletions test/Core.Tests/ProjectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class ProjectionTest : VerifyBase
public class ProjectionTest
{
private readonly IGremlinQuerySource _g;

public ProjectionTest() : base()
public ProjectionTest()
{
_g = g
.ConfigureEnvironment(x => x.UseModel(GraphModel
Expand Down
7 changes: 1 addition & 6 deletions test/Core.Tests/TansformerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class TansformerTest : VerifyBase
public class TansformerTest
{
public TansformerTest() : base()
{

}

[Fact]
public async Task Empty()
{
Expand Down
8 changes: 3 additions & 5 deletions test/Core.Tests/TraversalTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Collections.Immutable;

using ExRam.Gremlinq.Core.Steps;
using ExRam.Gremlinq.Core.Steps;
using FluentAssertions;

namespace ExRam.Gremlinq.Core.Tests
{
public class TraversalTest : VerifyBase
public class TraversalTest
{
private readonly Traversal _traversal;
private readonly IdentityStep _step1 = new ();
Expand All @@ -15,7 +13,7 @@ public class TraversalTest : VerifyBase
private readonly IdentityStep _step5 = new ();
private readonly IdentityStep _step6 = new ();

public TraversalTest() : base()
public TraversalTest()
{
_traversal = Traversal.Empty
.Push(_step1)
Expand Down
7 changes: 1 addition & 6 deletions test/Core.Tests/TypeSystemTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace ExRam.Gremlinq.Core.Tests
{
public class TypeSystemTest : VerifyBase
public class TypeSystemTest
{
private sealed class Vertex
{
Expand Down Expand Up @@ -38,11 +38,6 @@ private sealed class Edge
.ConfigureEnvironment(_ => _
.UseModel(GraphModel.FromBaseTypes<Vertex, Edge>()));

public TypeSystemTest() : base()
{

}

[Fact]
public void V_Properties_String()
{
Expand Down
7 changes: 1 addition & 6 deletions test/Providers.Core.Tests/PoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@

namespace ExRam.Gremlinq.Providers.Core.Tests
{
public class PoolTests : VerifyBase
public class PoolTests
{
public PoolTests() : base()
{

}

[Fact]
public async Task Pool_creates_subClient()
{
Expand Down
9 changes: 2 additions & 7 deletions test/PublicApi.Tests/PublicApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@

namespace ExRam.Gremlinq.PublicApi.Tests
{
public class PublicApiTests : VerifyBase
public class PublicApiTests
{
public PublicApiTests() : base()
{

}

[Fact]
public Task Core() => Verify("ExRam.Gremlinq.Core");

Expand Down Expand Up @@ -46,7 +41,7 @@ public PublicApiTests() : base()
[Fact]
public Task SupportNewtonsoftJson() => Verify("ExRam.Gremlinq.Support.NewtonsoftJson");

private Task Verify(string assemblyName) => base
private Task Verify(string assemblyName) => Verifier
.Verify(
Assembly
.Load(assemblyName)
Expand Down
7 changes: 1 addition & 6 deletions test/Support.NewtonsoftJson.Tests/Issues/Issue219.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace ExRam.Gremlinq.Support.NewtonsoftJson.Tests
{
public sealed class Issue219 : VerifyBase
public sealed class Issue219
{
private readonly struct CustomMemoryOwner : IMemoryOwner<byte>
{
Expand All @@ -33,11 +33,6 @@ public void Dispose()
}
}

public Issue219() : base()
{

}

[Fact]
public Task Repro()
{
Expand Down
4 changes: 2 additions & 2 deletions test/Support.NewtonsoftJson.Tests/TransformerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

namespace ExRam.Gremlinq.Support.NewtonsoftJson.Tests
{
public class TransformerTest : VerifyBase
public class TransformerTest
{
private readonly IGremlinQueryEnvironment _environment;

public TransformerTest() : base()
public TransformerTest()
{
_environment = GremlinQueryEnvironment.Invalid
.UseModel(GraphModel.FromBaseTypes<Vertex, Edge>())
Expand Down
11 changes: 7 additions & 4 deletions test/Tests.Infrastructure/GraphSon/GraphsonSupportTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@

namespace ExRam.Gremlinq.Tests.Infrastructure
{
public abstract class GraphsonSupportTestBase<TNativeToken> : VerifyBase
public abstract class GraphsonSupportTestBase<TNativeToken>
{
private readonly string _sourceFile;
protected readonly IGremlinQueryEnvironment _environment;

protected GraphsonSupportTestBase(Func<IGremlinQueryEnvironment, IGremlinQueryEnvironment> environmentTransformation, [CallerFilePath] string sourceFile = "") : base(sourceFile: sourceFile)
protected GraphsonSupportTestBase(Func<IGremlinQueryEnvironment, IGremlinQueryEnvironment> environmentTransformation, [CallerFilePath] string sourceFile = "")
{
_sourceFile = sourceFile;

_environment = GremlinQuerySource.g
.ConfigureEnvironment(env => environmentTransformation
.Invoke(env
Expand All @@ -38,8 +41,8 @@ protected virtual Task Verify<T>(string token, Func<IGremlinQueryEnvironment, IG
.TransformTo<T>()
.From(CreateNativeToken(token), environment);

return this
.Verify(subject)
return Verifier
.Verify(subject, sourceFile: _sourceFile)
.DontScrubDateTimes();
}

Expand Down
1 change: 0 additions & 1 deletion test/Tests.Infrastructure/QueryExecutionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using static ExRam.Gremlinq.Core.Transformation.ConverterFactory;
using ExRam.Gremlinq.Core;
using FluentAssertions;
using Gremlin.Net.Process.Traversal;

namespace ExRam.Gremlinq.Tests.Infrastructure
{
Expand Down