Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Jan 28, 2024
1 parent 36ffd57 commit d652cc6
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;

public class IncompleteMappingInheritanceQueryFbFixture : InheritanceQueryFbFixture
public class IncompleteMappingInheritanceQueryFbFixture : TPHInheritanceQueryFbFixture
{
public override bool IsDiscriminatorMappingComplete => false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.TestModels.GearsOfWarModel;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Xunit;

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;
Expand All @@ -31,6 +30,24 @@ public TPCGearsOfWarQueryFbTest(TPCGearsOfWarQueryFbFixture fixture)
: base(fixture)
{ }

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public override Task ToString_boolean_property_non_nullable(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Weapon>().Select(w => w.IsAutomatic.ToString()), elementAsserter: (lhs, rhs) => { Assert.True(lhs.Equals(rhs, System.StringComparison.OrdinalIgnoreCase)); });
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public override Task ToString_boolean_property_nullable(bool async)
{
return AssertQuery(
async,
ss => ss.Set<LocustHorde>().Select(lh => lh.Eradicated.ToString()), elementAsserter: (lhs, rhs) => { Assert.True(lhs.Equals(rhs, System.StringComparison.OrdinalIgnoreCase)); });
}

[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Array_access_on_byte_array(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;

public class FiltersInheritanceQueryFbFixture : InheritanceQueryFbFixture
public class TPHFiltersInheritanceQueryFbFixture : TPHInheritanceQueryFbFixture
{
public override bool EnableFilters => true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;

public class FiltersInheritanceQueryFbTest : FiltersInheritanceQueryTestBase<FiltersInheritanceQueryFbFixture>
public class TPHFiltersInheritanceQueryFbTest : FiltersInheritanceQueryTestBase<TPHFiltersInheritanceQueryFbFixture>
{
public FiltersInheritanceQueryFbTest(FiltersInheritanceQueryFbFixture fixture)
public TPHFiltersInheritanceQueryFbTest(TPHFiltersInheritanceQueryFbFixture fixture)
: base(fixture)
{ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;

public class InheritanceQueryFbFixture : TPHInheritanceQueryFixture
public class TPHInheritanceQueryFbFixture : TPHInheritanceQueryFixture
{
protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;

public class InheritanceQueryFbTest : TPHInheritanceQueryTestBase<InheritanceQueryFbFixture>
public class TPHInheritanceQueryFbTest : TPHInheritanceQueryTestBase<TPHInheritanceQueryFbFixture>
{
public InheritanceQueryFbTest(InheritanceQueryFbFixture fixture, ITestOutputHelper testOutputHelper)
public TPHInheritanceQueryFbTest(TPHInheritanceQueryFbFixture fixture, ITestOutputHelper testOutputHelper)
: base(fixture, testOutputHelper)
{ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ public TPTGearsOfWarQueryFbTest(TPTGearsOfWarQueryFbFixture fixture)
: base(fixture)
{ }

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public override Task ToString_boolean_property_non_nullable(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Weapon>().Select(w => w.IsAutomatic.ToString()), elementAsserter: (lhs, rhs) => { Assert.True(lhs.Equals(rhs, System.StringComparison.OrdinalIgnoreCase)); });
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public override Task ToString_boolean_property_nullable(bool async)
{
return AssertQuery(
async,
ss => ss.Set<LocustHorde>().Select(lh => lh.Eradicated.ToString()), elementAsserter: (lhs, rhs) => { Assert.True(lhs.Equals(rhs, System.StringComparison.OrdinalIgnoreCase)); });
}

[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Correlated_collections_inner_subquery_predicate_references_outer_qsre(bool async)
Expand Down

0 comments on commit d652cc6

Please sign in to comment.