diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs index 1f2493f63..314348d3d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs @@ -28,6 +28,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ApiConsistencyTestBase<>), typeof(Microsoft.EntityFrameworkCore.BadDataJsonDeserializationTestBase), typeof(Microsoft.EntityFrameworkCore.BuiltInDataTypesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.ComplexTypesTrackingRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.ComplexTypesTrackingTestBase<>), typeof(Microsoft.EntityFrameworkCore.CompositeKeyEndToEndTestBase<>), typeof(Microsoft.EntityFrameworkCore.ConcurrencyDetectorDisabledTestBase<>), @@ -47,6 +48,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.InterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.JsonTypesTestBase), typeof(Microsoft.EntityFrameworkCore.KeysWithConvertersTestBase<>), + typeof(Microsoft.EntityFrameworkCore.LazyLoadProxyRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.LazyLoadProxyTestBase<>), typeof(Microsoft.EntityFrameworkCore.LoadTestBase<>), typeof(Microsoft.EntityFrameworkCore.LoggingTestBase), @@ -60,6 +62,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.NotificationEntitiesTestBase<>), typeof(Microsoft.EntityFrameworkCore.OptimisticConcurrencyTestBase<,>), typeof(Microsoft.EntityFrameworkCore.OverzealousInitializationTestBase<>), + typeof(Microsoft.EntityFrameworkCore.PropertyValuesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.PropertyValuesTestBase<>), typeof(Microsoft.EntityFrameworkCore.QueryExpressionInterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.AdHocManyToManyQueryTestBase), @@ -92,6 +95,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.TransactionTestBase<>), typeof(Microsoft.EntityFrameworkCore.TwoDatabasesTestBase), + typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexCollectionTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexTypeTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ModelBuilderTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.InheritanceTestBase), @@ -102,6 +106,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.OneToOneTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.OwnedTypesTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalNonRelationshipTestBase), + typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalComplexCollectionTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalComplexTypeTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalInheritanceTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalOneToManyTestBase), @@ -111,12 +116,10 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalOwnedTypesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.BulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.ComplexTypeBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NorthwindBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.ComplexTypeBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesRelationalTestBase), @@ -127,6 +130,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTFiltersInheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Update.ComplexCollectionJsonUpdateTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.JsonUpdateTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.NonSharedModelUpdatesTestBase), typeof(Microsoft.EntityFrameworkCore.Update.StoredProcedureUpdateTestBase), @@ -142,7 +146,21 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian // JSON not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryTestBase), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonBulkUpdateRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonMiscellaneousRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonProjectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonSetOperationsRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonStructuralEqualityRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonBulkUpdateRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonMiscellaneousRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonProjectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonStructuralEqualityRelationalTestBase<>), // Spatial not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.SpatialQueryTestBase<>), @@ -152,6 +170,19 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.Query.AdHocPrecompiledQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.PrecompiledQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.PrecompiledSqlPregenerationQueryRelationalTestBase), + + // Tests for JSON Types in queries + typeof(Microsoft.EntityFrameworkCore.Types.RelationalTypeTestBase<,>), + typeof(Microsoft.EntityFrameworkCore.Types.TypeTestBase<,>), + + // Uses Complex Types with collections (JSON Arrays) + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesPrimitiveCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesSetOperationsTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting.ComplexTableSplittingPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations.OwnedNavigationsPrimitiveCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations.OwnedNavigationsPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting.OwnedTableSplittingPrimitiveCollectionRelationalTestBase<>), ]; protected override Assembly TargetAssembly { get; } = typeof(ComplianceFbTest).Assembly; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj index e22c6ae10..076c11266 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs index 96fc88b6b..235265b98 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs @@ -76,10 +76,11 @@ string Simplify(string name) { name = new string(name.Where(char.IsUpper).ToArray()); var cnt = 1; - while (names.Contains(name)) + while (names.Contains(name + cnt)) { - name += cnt++; + cnt++; } + name += cnt; names.Add(name); return name; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs index 0b2be24b1..d1d059939 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs @@ -275,6 +275,27 @@ public MigrationsFbTest(MigrationsFbFixture fixture) [Fact(Skip = SkipReason)] public override Task UpdateDataOperation_composite_key() => base.UpdateDataOperation_composite_key(); + [Fact(Skip = SkipReason)] + public override Task Create_table_with_complex_properties_mapped_to_json() => base.Create_table_with_complex_properties_mapped_to_json(); + + [Fact(Skip = SkipReason)] + public override Task Create_table_with_complex_properties_with_nested_collection_mapped_to_json() => base.Create_table_with_complex_properties_with_nested_collection_mapped_to_json(); + + [Fact(Skip = SkipReason)] + public override Task Create_table_with_optional_complex_type_with_required_properties() => base.Create_table_with_optional_complex_type_with_required_properties(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_create_table_and_drop_it_in_one_migration() => base.Multiop_create_table_and_drop_it_in_one_migration(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_drop_table_and_create_the_same_table_in_one_migration() => base.Multiop_drop_table_and_create_the_same_table_in_one_migration(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_rename_table_and_create_new_table_with_the_old_name() => base.Multiop_rename_table_and_create_new_table_with_the_old_name(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_rename_table_and_drop() => base.Multiop_rename_table_and_drop(); + [Fact(Skip = SkipReason)] public override Task UpdateDataOperation_multiple_columns() => base.UpdateDataOperation_multiple_columns(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs index f18e24d8a..a0d735c56 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocAdvancedMappingsQueryFbTest : AdHocAdvancedMappingsQueryRelationalTestBase +public class AdHocAdvancedMappingsQueryFbTest(NonSharedFixture fixture) : AdHocAdvancedMappingsQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs index e8a58d4a4..fd4837ac8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs @@ -15,13 +15,23 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocComplexTypeQueryFbTest : AdHocComplexTypeQueryTestBase +public class AdHocComplexTypeQueryFbTest(NonSharedFixture fixture) : AdHocComplexTypeQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + + // Uses a custom type mapping DateTime to "datetime" which doesn't exist in Firebird. + [NotSupportedByProviderFact] + public override Task Complex_type_equality_with_non_default_type_mapping() + { + return base.Complex_type_equality_with_non_default_type_mapping(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs index d091978f5..14c72269f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocManyToManyQueryFbTest : AdHocManyToManyQueryRelationalTestBase +public class AdHocManyToManyQueryFbTest(NonSharedFixture fixture) : AdHocManyToManyQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs index 1acdeedb5..5ee227890 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs @@ -19,17 +19,26 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using FirebirdSql.EntityFrameworkCore.Firebird.Infrastructure; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocMiscellaneousQueryFbTest : AdHocMiscellaneousQueryRelationalTestBase +public class AdHocMiscellaneousQueryFbTest(NonSharedFixture fixture) : AdHocMiscellaneousQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, + ParameterTranslationMode parameterizedCollectionMode) + { + new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); + return optionsBuilder; + } + [DoesNotHaveTheDataTheory] [MemberData(nameof(IsAsyncData))] public override Task StoreType_for_UDF_used(bool async) @@ -78,6 +87,13 @@ public override Task Operators_combine_nullability_of_entity_shapers() return base.Operators_combine_nullability_of_entity_shapers(); } + [NotSupportedByProviderTheory] + [MemberData(nameof(InlinedRedactingData))] + public override Task Check_inlined_constants_redacting(bool async, bool enableSensitiveDataLogging) + { + return base.Check_inlined_constants_redacting(async, enableSensitiveDataLogging); + } + protected override async Task Seed2951(Context2951 context) { await context.Database.ExecuteSqlRawAsync("""CREATE TABLE "ZeroKey" ("Id" INT)"""); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs index 6ceedbf87..baee85ccf 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs @@ -26,7 +26,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocNavigationsQueryFbTest : AdHocNavigationsQueryRelationalTestBase +public class AdHocNavigationsQueryFbTest(NonSharedFixture fixture) : AdHocNavigationsQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs index 24a64585c..c354e5a82 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs @@ -17,13 +17,14 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocQueryFiltersQueryFbTest : AdHocQueryFiltersQueryRelationalTestBase +public class AdHocQueryFiltersQueryFbTest(NonSharedFixture fixture) : AdHocQueryFiltersQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs index c08ae53aa..53a6213e5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs @@ -28,7 +28,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocQuerySplittingQueryFbTest : AdHocQuerySplittingQueryTestBase +public class AdHocQuerySplittingQueryFbTest(NonSharedFixture fixture) : AdHocQuerySplittingQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs new file mode 100644 index 000000000..2fa121910 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingBulkUpdateFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : ComplexTableSplittingBulkUpdateRelationalTestBase(fixture, testOutputHelper) +{ + [NotSupportedByProviderFact] + public override Task Update_inside_primitive_collection() + { + return base.Update_inside_primitive_collection(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs new file mode 100644 index 000000000..29f45bc38 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs @@ -0,0 +1,28 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingFbFixture : ComplexTableSplittingRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs new file mode 100644 index 000000000..5f71c34f3 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingMiscellaneousFbTest : ComplexTableSplittingMiscellaneousRelationalTestBase +{ + public ComplexTableSplittingMiscellaneousFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs new file mode 100644 index 000000000..ddc8fbfdc --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs @@ -0,0 +1,50 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingProjectionFbTest : ComplexTableSplittingProjectionRelationalTestBase +{ + public ComplexTableSplittingProjectionFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + // Users OUTER join + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + // Users OUTER join + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs new file mode 100644 index 000000000..6638c2660 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingStructuralEqualityFbTest : ComplexTableSplittingStructuralEqualityRelationalTestBase +{ + public ComplexTableSplittingStructuralEqualityFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs new file mode 100644 index 000000000..513ddcd84 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs @@ -0,0 +1,46 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsCollectionFbTest : NavigationsCollectionRelationalTestBase +{ + public NavigationsCollectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, + testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Distinct_projected(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Distinct_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs new file mode 100644 index 000000000..dd5f7207d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs @@ -0,0 +1,28 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsFbFixture : NavigationsRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs new file mode 100644 index 000000000..df99d7d47 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsIncludeFbTest : NavigationsIncludeRelationalTestBase +{ + public NavigationsIncludeFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs new file mode 100644 index 000000000..c2321831e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsMiscellaneousFbTest : NavigationsMiscellaneousRelationalTestBase +{ + public NavigationsMiscellaneousFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs new file mode 100644 index 000000000..ffad14298 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs @@ -0,0 +1,68 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsPrimitiveCollectionFbTest : NavigationsPrimitiveCollectionRelationalTestBase +{ + public NavigationsPrimitiveCollectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Any_predicate() + { + return base.Any_predicate(); + } + + [NotSupportedByProviderFact] + public override Task Contains() + { + return base.Contains(); + } + + [NotSupportedByProviderFact] + public override Task Count() + { + return base.Count(); + } + + [NotSupportedByProviderFact] + public override Task Index() + { + return base.Index(); + } + + [NotSupportedByProviderFact] + public override Task Nested_Count() + { + return base.Nested_Count(); + } + + [NotSupportedByProviderFact] + public override Task Select_Sum() + { + return base.Select_Sum(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs new file mode 100644 index 000000000..1ecdb44a5 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsProjectionFbTest : NavigationsProjectionRelationalTestBase +{ + public NavigationsProjectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs new file mode 100644 index 000000000..b5af67b79 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsSetOperationsFbTest : NavigationsSetOperationsRelationalTestBase +{ + public NavigationsSetOperationsFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs new file mode 100644 index 000000000..a3bb5a67d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs @@ -0,0 +1,13 @@ +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsStructuralEqualityFbTest : NavigationsStructuralEqualityRelationalTestBase +{ + public NavigationsStructuralEqualityFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs new file mode 100644 index 000000000..ff3511184 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs @@ -0,0 +1,45 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsCollectionFbTest : OwnedNavigationsCollectionRelationalTestBase +{ + public OwnedNavigationsCollectionFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Distinct_projected(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Distinct_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs new file mode 100644 index 000000000..84cccfaa9 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs @@ -0,0 +1,37 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsFbFixture : OwnedNavigationsRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + + ModelHelpers.SimpleTableNames(modelBuilder); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs new file mode 100644 index 000000000..93fc2e362 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsMiscellaneousFbTest : OwnedNavigationsMiscellaneousRelationalTestBase +{ + public OwnedNavigationsMiscellaneousFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs new file mode 100644 index 000000000..4b08fbbd9 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsProjectionFbTest : OwnedNavigationsProjectionRelationalTestBase +{ + public OwnedNavigationsProjectionFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs new file mode 100644 index 000000000..26df67b9d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs @@ -0,0 +1,41 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsSetOperationsFbTest : OwnedNavigationsSetOperationsRelationalTestBase +{ + public OwnedNavigationsSetOperationsFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Over_associate_collection_projected(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Over_associate_collection_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs new file mode 100644 index 000000000..b7ef84a80 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsStructuralEqualityFbTest : OwnedNavigationsStructuralEqualityRelationalTestBase +{ + public OwnedNavigationsStructuralEqualityFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs new file mode 100644 index 000000000..ebfba3a59 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs @@ -0,0 +1,73 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingFbFixture : OwnedTableSplittingRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + + modelBuilder.Entity(b => + { + b.OwnsOne( + e => e.RequiredAssociate, rrb => + { + rrb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("RR_NC"); // RequiredRelated_NestedCollection + }); + }); + b.Navigation(x => x.RequiredAssociate).IsRequired(); + + b.OwnsOne( + e => e.OptionalAssociate, orb => + { + orb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("OR_NC"); // OptionalRelated_NestedCollection + }); + }); + b.Navigation(x => x.OptionalAssociate).IsRequired(false); + + b.OwnsMany( + e => e.AssociateCollection, rcb => + { + rcb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("RC_NC"); // RelatedCollection_NestedCollection + }); + }); + }); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs new file mode 100644 index 000000000..63f127a76 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingMiscellaneousFbTest : OwnedTableSplittingMiscellaneousRelationalTestBase +{ + public OwnedTableSplittingMiscellaneousFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs new file mode 100644 index 000000000..7985b5600 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingProjectionFbTest : OwnedTableSplittingProjectionRelationalTestBase +{ + public OwnedTableSplittingProjectionFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs new file mode 100644 index 000000000..bfe826a2c --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingStructuralEqualityFbTest : OwnedTableSplittingStructuralEqualityRelationalTestBase +{ + public OwnedTableSplittingStructuralEqualityFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs index 0e84b62ab..d2799bb16 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs @@ -34,20 +34,6 @@ public ComplexTypeQueryFbTest(ComplexTypeQueryFbFixture fixture) : base(fixture) { } - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_complex_type_via_optional_navigation(bool async) - { - return Assert.ThrowsAsync(() => base.Project_complex_type_via_optional_navigation(async)); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_struct_complex_type_via_optional_navigation(bool async) - { - return Assert.ThrowsAsync(() => base.Project_struct_complex_type_via_optional_navigation(async)); - } - [Theory] [MemberData(nameof(IsAsyncData))] public override Task Union_property_in_complex_type(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs index 8c02f77e2..d5d617de9 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class EntitySplittingQueryFbTest : EntitySplittingQueryTestBase +public class EntitySplittingQueryFbTest(NonSharedFixture fixture) : EntitySplittingQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs index 0644961ef..7266ed6c5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs @@ -150,18 +150,18 @@ public override Task FromSqlRaw_queryable_simple_projection_composed(bool async) return base.FromSqlRaw_queryable_simple_projection_composed(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = "Firebird matches the casing exactly. Frankly the test is weird.")] [MemberData(nameof(IsAsyncData))] - public override Task Multiple_occurrences_of_FromSql_with_db_parameter_adds_parameter_only_once(bool async) + public override Task FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(bool async) { - return base.Multiple_occurrences_of_FromSql_with_db_parameter_adds_parameter_only_once(async); + return base.FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(async); } - [Theory(Skip = "Firebird matches the casing exactly. Frankly the test is weird.")] + [Theory(Skip = "Provider doesn't support INTERSECT")] [MemberData(nameof(IsAsyncData))] - public override Task FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(bool async) + public override Task Multiple_occurrences_of_FromSql_with_db_parameter_adds_two_parameters(bool async) { - return base.FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(async); + return base.Multiple_occurrences_of_FromSql_with_db_parameter_adds_two_parameters(async); } protected override DbParameter CreateDbParameter(string name, object value) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs index f6d64548d..fde4e3cc5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs @@ -33,132 +33,6 @@ public GearsOfWarQueryFbTest(GearsOfWarQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddDays(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddDays(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddHours(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddHours(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMilliseconds(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMilliseconds(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMinutes(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMinutes(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMonths(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMonths(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddSeconds(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddSeconds(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddYears(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddYears(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool isAsync) - { - return base.Where_datetimeoffset_date_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool isAsync) - { - return base.Where_datetimeoffset_dayofyear_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool isAsync) - { - return base.Where_datetimeoffset_day_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool isAsync) - { - return base.Where_datetimeoffset_hour_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool isAsync) - { - return base.Where_datetimeoffset_millisecond_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool isAsync) - { - return base.Where_datetimeoffset_minute_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool isAsync) - { - return base.Where_datetimeoffset_month_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool isAsync) - { - return base.Where_datetimeoffset_now(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool isAsync) - { - return base.Where_datetimeoffset_second_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool isAsync) - { - return base.Where_datetimeoffset_utcnow(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool isAsync) - { - return base.Where_datetimeoffset_year_component(isAsync); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffsetNow_minus_timespan(bool async) @@ -285,13 +159,6 @@ public override Task Subquery_projecting_nullable_scalar_contains_nullable_value return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -369,20 +236,6 @@ public override Task Correlated_collections_with_Distinct(bool async) return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) @@ -397,20 +250,6 @@ public override Task Subquery_inside_Take_argument(bool async) return base.Subquery_inside_Take_argument(async); } - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - [NotSupportedByProviderTheory] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) @@ -418,20 +257,6 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) return base.Non_string_concat_uses_appropriate_type_mapping(async); } - [Theory(Skip = "NETProvider#1008")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory(Skip = "NETProvider#1009")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - [Theory(Skip = "Different implicit ordering on Firebird.")] [MemberData(nameof(IsAsyncData))] public override Task String_concat_with_null_conditional_argument(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs index b197da91b..a31978ada 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs @@ -22,20 +22,16 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class NonSharedPrimitiveCollectionsQueryFbTest : NonSharedPrimitiveCollectionsQueryRelationalTestBase +public class NonSharedPrimitiveCollectionsQueryFbTest(NonSharedFixture fixture) : NonSharedPrimitiveCollectionsQueryRelationalTestBase(fixture) { - protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToConstants(DbContextOptionsBuilder optionsBuilder) + protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, + ParameterTranslationMode parameterizedCollectionMode) { - new FbDbContextOptionsBuilder(optionsBuilder).TranslateParameterizedCollectionsToConstants(); - return optionsBuilder; - } - - protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToParameters(DbContextOptionsBuilder optionsBuilder) - { - new FbDbContextOptionsBuilder(optionsBuilder).TranslateParameterizedCollectionsToParameters(); + new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); return optionsBuilder; } @@ -195,28 +191,49 @@ public override Task Column_collection_inside_json_owned_entity() return base.Column_collection_inside_json_owned_entity(); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_constants() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_constants(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_parameters() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Contains_with_default_mode_EF_Constant(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_parameters(); + return base.Parameter_collection_Contains_with_default_mode_EF_Constant(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(mode); + } + + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(mode); } protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs index eb9cdec0b..f63ae34e0 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs @@ -15,14 +15,8 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using System; -using System.Linq; -using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestModels.Northwind; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -31,277 +25,4 @@ public class NorthwindFunctionsQueryFbTest : NorthwindFunctionsQueryRelationalTe public NorthwindFunctionsQueryFbTest(NorthwindQueryFbFixture fixture) : base(fixture) { } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToBoolean(bool async) - { - return base.Convert_ToBoolean(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToByte(bool async) - { - return base.Convert_ToByte(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToDecimal(bool async) - { - return base.Convert_ToDecimal(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToDouble(bool async) - { - return base.Convert_ToDouble(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt16(bool async) - { - return base.Convert_ToInt16(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt32(bool async) - { - return base.Convert_ToInt32(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt64(bool async) - { - return base.Convert_ToInt64(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToString(bool async) - { - return base.Convert_ToString(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Trim_with_char_array_argument_in_predicate(bool async) - { - return base.Trim_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task TrimEnd_with_char_array_argument_in_predicate(bool async) - { - return base.TrimEnd_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task TrimStart_with_char_array_argument_in_predicate(bool async) - { - return base.TrimStart_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_math_degrees(bool async) - { - return base.Where_math_degrees(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_math_radians(bool async) - { - return base.Where_mathf_radians(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_degrees(bool async) - { - return base.Where_math_degrees(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_radians(bool async) - { - return base.Where_mathf_radians(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task String_Join_non_aggregate(bool async) - { - return AssertTranslationFailed(() => base.String_Join_non_aggregate(async)); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Regex_IsMatch_MethodCall(bool async) - { - return base.Regex_IsMatch_MethodCall(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Regex_IsMatch_MethodCall_constant_input(bool async) - { - return base.Regex_IsMatch_MethodCall_constant_input(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_abs1(bool async) - { - return base.Where_mathf_abs1(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_acos(bool async) - { - return base.Where_mathf_acos(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_asin(bool async) - { - return base.Where_mathf_asin(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_atan(bool async) - { - return base.Where_mathf_atan(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_atan2(bool async) - { - return base.Where_mathf_atan2(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_ceiling1(bool async) - { - return base.Where_mathf_ceiling1(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_cos(bool async) - { - return base.Where_mathf_cos(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_exp(bool async) - { - return base.Where_mathf_exp(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_floor(bool async) - { - return base.Where_mathf_floor(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log(bool async) - { - return base.Where_mathf_log(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log_new_base(bool async) - { - return base.Where_mathf_log_new_base(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log10(bool async) - { - return base.Where_mathf_log10(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_power(bool async) - { - return base.Where_mathf_power(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_round2(bool async) - { - return base.Where_mathf_round2(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sign(bool async) - { - return base.Where_mathf_sign(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sin(bool async) - { - return base.Where_mathf_sin(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sqrt(bool async) - { - return base.Where_mathf_sqrt(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_square(bool async) - { - return base.Where_mathf_square(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_tan(bool async) - { - return base.Where_mathf_tan(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_truncate(bool async) - { - return base.Where_mathf_truncate(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Datetime_subtraction_TotalDays(bool async) - { - return base.Datetime_subtraction_TotalDays(async); - } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs index eae538742..978f24f83 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs @@ -145,4 +145,18 @@ public override Task Subquery_with_navigation_inside_inline_collection(bool asyn { return base.Subquery_with_navigation_inside_inline_collection(async); } + + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(bool async) + { + return base.SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(async); + } + + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Where_nanosecond_and_microsecond_component(bool async) + { + return base.Where_nanosecond_and_microsecond_component(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs index 1c81f0cf2..167f69d17 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs @@ -18,6 +18,7 @@ using System; using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -37,6 +38,16 @@ public override Task Union_Select_scalar(bool async) return base.Union_Select_scalar(async); } + [Theory] + [MemberData(nameof(IsAsyncData))] + public override Task Union_inside_Concat(bool async) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan5()) + return Task.CompletedTask; + return base.Union_inside_Concat(async); + } + [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Select_Except_reference_projection(bool async) @@ -120,4 +131,11 @@ public override Task Client_eval_Union_FirstOrDefault(bool async) { return Assert.ThrowsAsync(() => base.Client_eval_Union_FirstOrDefault(async)); } + + [NotSupportedOnFirebirdTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Except_nested2(bool async) + { + return base.Except_nested2(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs index 0632ea821..36d5d5f7f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs @@ -15,12 +15,8 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using System.Linq; using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; -using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestModels.Northwind; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -32,60 +28,6 @@ public NorthwindWhereQueryFbTest(NorthwindQueryFbFixture fi : base(fixture) { } - [Theory] - [MemberData(nameof(IsAsyncData))] - // See #24234 on efcore. - public override async Task Like_with_non_string_column_using_ToString(bool async) - { - using var context = CreateContext(); - - var query = context.Set().Where(o => EF.Functions.Like(o.OrderID.ToString(), "%20%")); - var result = async ? await query.ToListAsync() : query.ToList(); - - Assert.Equal(new[] { 10320, 10420, 10520, 10620, 10720, 10820, 10920, 11020 }, result.Select(e => e.OrderID).OrderBy(x => x)); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - // See #24234 on efcore. - public override async Task Like_with_non_string_column_using_double_cast(bool async) - { - using var context = CreateContext(); - - var query = context.Set().Where(o => EF.Functions.Like((string)(object)o.OrderID, "%20%")); - var result = async ? await query.ToListAsync() : query.ToList(); - - Assert.Equal(new[] { 10320, 10420, 10520, 10620, 10720, 10820, 10920, 11020 }, result.Select(e => e.OrderID).OrderBy(x => x)); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetime_utcnow(bool async) - { - return base.Where_datetime_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now_component(bool async) - { - return base.Where_datetimeoffset_now_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow_component(bool async) - { - return base.Where_datetimeoffset_utcnow_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - [Theory] [MemberData(nameof(IsAsyncData))] public override Task Where_compare_constructed_equal(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs index 1fdbc215d..291927353 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OperatorsProceduralFbTest : OperatorsProceduralQueryTestBase +public class OperatorsProceduralFbTest(NonSharedFixture fixture) : OperatorsProceduralQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs index 626db284e..a4e220c8e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs @@ -27,7 +27,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OperatorsQueryFbTest : OperatorsQueryTestBase +public class OperatorsQueryFbTest(NonSharedFixture fixture) : OperatorsQueryTestBase(fixture) { [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] @@ -36,16 +36,5 @@ public override Task Concat_and_json_scalar(bool async) return base.Concat_and_json_scalar(async); } - protected override Task> InitializeAsync(Action onModelCreating = null, Action onConfiguring = null, Func addServices = null, Action configureConventions = null, Func seed = null, Func shouldLogCategory = null, Func> createTestStore = null, bool usePooling = true, bool useServiceProvider = true) - { - return base.InitializeAsync( - modelBuilder => - { - ModelHelpers.SetStringLengths(modelBuilder); - onModelCreating?.Invoke(modelBuilder); - }, - onConfiguring, addServices, configureConventions, seed, shouldLogCategory, createTestStore, usePooling, useServiceProvider); - } - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs index f7c61b159..11f7aef7b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs @@ -18,13 +18,14 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OwnedEntityQueryFbTest : OwnedEntityQueryRelationalTestBase +public class OwnedEntityQueryFbTest(NonSharedFixture fixture) : OwnedEntityQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs index 2ba0a856e..8d8bd1378 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs @@ -35,7 +35,7 @@ public PrimitiveCollectionsQueryFbTest(PrimitiveCollectionsQueryFbFixture fixtur [ConditionalFact] public virtual async Task Json_representation_of_bool_array() { - await using var context = CreateContext(); + await using var context = Fixture.CreateContext(); Assert.Equal( "[true,false]", @@ -49,667 +49,449 @@ public override void Parameter_collection_in_subquery_and_Convert_as_compiled_qu base.Parameter_collection_in_subquery_and_Convert_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(bool async) + [NotSupportedOnFirebirdFact] + public override Task Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query() + { + return base.Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Any() + { + return base.Column_collection_Any(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Contains_over_subquery() + { + return base.Column_collection_Contains_over_subquery(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Count_method() + { + return base.Column_collection_Count_method(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Count_with_predicate() + { + return base.Column_collection_Count_with_predicate(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Distinct() + { + return base.Column_collection_Distinct(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_ElementAt() + { + return base.Column_collection_ElementAt(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_First() + { + return base.Column_collection_First(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_FirstOrDefault() + { + return base.Column_collection_FirstOrDefault(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_in_subquery_Union_parameter_collection() + { + return base.Column_collection_in_subquery_Union_parameter_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_beyond_end() + { + return base.Column_collection_index_beyond_end(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_datetime() + { + return base.Column_collection_index_datetime(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_int() + { + return base.Column_collection_index_int(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_string() + { + return base.Column_collection_index_string(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Intersect_inline_collection() + { + return base.Column_collection_Intersect_inline_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Join_parameter_collection() + { + return base.Column_collection_Join_parameter_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Length() + { + return base.Column_collection_Length(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_bools_Contains() + { + return base.Column_collection_of_bools_Contains(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_ints_Contains() + { + return base.Column_collection_of_ints_Contains(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_ints_Contains() { - return base.Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(async); + return base.Column_collection_of_nullable_ints_Contains(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_strings_contains_null(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_ints_Contains_null() { - return base.Column_collection_of_strings_contains_null(async); + return base.Column_collection_of_nullable_ints_Contains_null(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_one_value(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_strings_contains_null() { - return base.Inline_collection_Count_with_one_value(async); + return base.Column_collection_of_nullable_strings_contains_null(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_two_values(bool async) - { - return base.Inline_collection_Count_with_two_values(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_strings_contains_null() + { + return base.Column_collection_of_strings_contains_null(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_three_values(bool async) - { - return base.Inline_collection_Count_with_three_values(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_OrderByDescending_ElementAt() + { + return base.Column_collection_OrderByDescending_ElementAt(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Count(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany() { - return base.Parameter_collection_Count(async); + return base.Column_collection_SelectMany(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_ints_Contains_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany_with_filter() { - return base.Parameter_collection_of_ints_Contains_int(async); + return base.Column_collection_SelectMany_with_filter(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_nullable_ints_Contains_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany_with_Select_to_anonymous_type() { - return base.Parameter_collection_of_nullable_ints_Contains_int(async); + return base.Column_collection_SelectMany_with_Select_to_anonymous_type(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_nullable_ints_Contains_nullable_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Single() { - return base.Parameter_collection_of_nullable_ints_Contains_nullable_int(async); + return base.Column_collection_Single(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_strings_Contains_string(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SingleOrDefault() { - return base.Parameter_collection_of_strings_Contains_string(async); + return base.Column_collection_SingleOrDefault(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_strings_Contains_nullable_string(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Skip() { - return base.Parameter_collection_of_strings_Contains_nullable_string(async); + return base.Column_collection_Skip(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_DateTimes_Contains(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Skip_Take() { - return base.Parameter_collection_of_DateTimes_Contains(async); + return base.Column_collection_Skip_Take(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_bools_Contains(bool async) - { - return base.Parameter_collection_of_bools_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Take() + { + return base.Column_collection_Take(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_enums_Contains(bool async) - { - return base.Parameter_collection_of_enums_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Union_parameter_collection() + { + return base.Column_collection_Union_parameter_collection(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_null_Contains(bool async) - { - return base.Parameter_collection_null_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Count() + { + return base.Column_collection_Where_Count(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_ints_Contains(bool async) - { - return base.Column_collection_of_ints_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_ints_Contains(bool async) - { - return base.Column_collection_of_nullable_ints_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_ints_Contains_null(bool async) - { - return base.Column_collection_of_nullable_ints_Contains_null(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_strings_contains_null(bool async) - { - return base.Column_collection_of_nullable_strings_contains_null(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_bools_Contains(bool async) - { - return base.Column_collection_of_bools_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Count_method(bool async) - { - return base.Column_collection_Count_method(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Count_with_predicate(bool async) - { - return base.Column_collection_Count_with_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Length(bool async) - { - return base.Column_collection_Length(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_int(bool async) - { - return base.Column_collection_index_int(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_string(bool async) - { - return base.Column_collection_index_string(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_datetime(bool async) - { - return base.Column_collection_index_datetime(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_beyond_end(bool async) - { - return base.Column_collection_index_beyond_end(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nullable_reference_column_collection_index_equals_nullable_column(bool async) - { - return base.Nullable_reference_column_collection_index_equals_nullable_column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Non_nullable_reference_column_collection_index_equals_nullable_column(bool async) - { - return base.Non_nullable_reference_column_collection_index_equals_nullable_column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_index_Column(bool async) - { - return base.Inline_collection_index_Column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_index_Column_equal_Column(bool async) - { - return base.Parameter_collection_index_Column_equal_Column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_index_Column_equal_constant(bool async) - { - return base.Parameter_collection_index_Column_equal_constant(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_ElementAt(bool async) - { - return base.Column_collection_ElementAt(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Skip(bool async) - { - return base.Column_collection_Skip(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Take(bool async) - { - return base.Column_collection_Take(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Skip_Take(bool async) - { - return base.Column_collection_Skip_Take(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_OrderByDescending_ElementAt(bool async) - { - return base.Column_collection_OrderByDescending_ElementAt(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Any(bool async) - { - return base.Column_collection_Any(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Distinct(bool async) - { - return base.Column_collection_Distinct(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Join_parameter_collection(bool async) - { - return base.Column_collection_Join_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Join_ordered_column_collection(bool async) - { - return base.Inline_collection_Join_ordered_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Concat_column_collection(bool async) - { - return base.Parameter_collection_Concat_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Union_parameter_collection(bool async) - { - return base.Column_collection_Union_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Intersect_inline_collection(bool async) - { - return base.Column_collection_Intersect_inline_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Except_column_collection(bool async) - { - return base.Inline_collection_Except_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection_nested(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection_nested(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Count_as_compiled_query(bool async) - { - return base.Parameter_collection_in_subquery_Count_as_compiled_query(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_in_subquery_Union_parameter_collection(bool async) - { - return base.Column_collection_in_subquery_Union_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_ints_ordered(bool async) - { - return base.Project_collection_of_ints_ordered(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_datetimes_filtered(bool async) - { - return base.Project_collection_of_datetimes_filtered(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging2(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging2(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging3(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging3(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_ElementAt() + { + return base.Column_collection_Where_ElementAt(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_ints_with_distinct(bool async) - { - return base.Project_collection_of_ints_with_distinct(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Skip() + { + return base.Column_collection_Where_Skip(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_empty_collection_of_nullables_and_collection_only_containing_nulls(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Skip_Take() { - return base.Project_empty_collection_of_nullables_and_collection_only_containing_nulls(async); + return base.Column_collection_Where_Skip_Take(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_multiple_collections(bool async) - { - return base.Project_multiple_collections(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Take() + { + return base.Column_collection_Where_Take(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_primitive_collections_element(bool async) - { - return base.Project_primitive_collections_element(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Union() + { + return base.Column_collection_Where_Union(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nested_contains_with_Lists_and_no_inferred_type_mapping(bool async) - { - return base.Nested_contains_with_Lists_and_no_inferred_type_mapping(async); - } + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_column_predicate_with_EF_Parameter() + { + return base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nested_contains_with_arrays_and_no_inferred_type_mapping(bool async) - { - return base.Nested_contains_with_arrays_and_no_inferred_type_mapping(async); - } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Contains_over_subquery(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_one_value() { - return base.Column_collection_Contains_over_subquery(async); + return base.Inline_collection_Count_with_one_value(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_First(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_two_values() { - return base.Column_collection_First(async); + return base.Inline_collection_Count_with_two_values(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_FirstOrDefault(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_three_values() { - return base.Column_collection_FirstOrDefault(async); + return base.Inline_collection_Count_with_three_values(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Except_column_collection() { - return base.Column_collection_SelectMany(async); + return base.Inline_collection_Except_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany_with_filter(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_index_Column() { - return base.Column_collection_SelectMany_with_filter(async); + return base.Inline_collection_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany_with_Select_to_anonymous_type(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_index_Column_with_EF_Constant() { - return base.Column_collection_SelectMany_with_Select_to_anonymous_type(async); + return base.Inline_collection_index_Column_with_EF_Constant(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Single(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Join_ordered_column_collection() { - return base.Column_collection_Single(async); + return base.Inline_collection_Join_ordered_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SingleOrDefault(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_List_value_index_Column() { - return base.Column_collection_SingleOrDefault(async); + return base.Inline_collection_List_value_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Count(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_Max() { - return base.Column_collection_Where_Count(async); + return base.Inline_collection_of_nullable_value_type_Max(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_ElementAt(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_Min() { - return base.Column_collection_Where_ElementAt(async); + return base.Inline_collection_of_nullable_value_type_Min(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Skip(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_with_null_Max() { - return base.Column_collection_Where_Skip(async); + return base.Inline_collection_of_nullable_value_type_with_null_Max(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Skip_Take(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_with_null_Min() { - return base.Column_collection_Where_Skip_Take(async); + return base.Inline_collection_of_nullable_value_type_with_null_Min(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Take(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_value_index_Column() { - return base.Column_collection_Where_Take(async); + return base.Inline_collection_value_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Union(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_with_single_parameter_element_Count() { - return base.Column_collection_Where_Union(async); + return base.Inline_collection_with_single_parameter_element_Count(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_column_predicate_with_EF_Parameter(bool async) + + [NotSupportedByProviderFact] + public override Task Non_nullable_reference_column_collection_index_equals_nullable_column() { - return base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(async); + return base.Non_nullable_reference_column_collection_index_equals_nullable_column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Max_with_three_values(bool async) + + [NotSupportedByProviderFact] + public override Task Nullable_reference_column_collection_index_equals_nullable_column() { - return base.Inline_collection_List_Max_with_three_values(async); + return base.Nullable_reference_column_collection_index_equals_nullable_column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Max_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Concat_column_collection() { - return base.Inline_collection_List_Max_with_two_values(async); + return base.Parameter_collection_Concat_column_collection(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Min_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Count() { - return base.Inline_collection_List_Min_with_two_values(async); + return base.Parameter_collection_Count(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_value_index_Column(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Count_with_column_predicate_with_EF_Constant() { - return base.Inline_collection_List_value_index_Column(async); + return base.Parameter_collection_Count_with_column_predicate_with_EF_Constant(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Max_with_three_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_ImmutableArray_of_ints_Contains_int() { - return base.Inline_collection_Max_with_three_values(async); + return base.Parameter_collection_ImmutableArray_of_ints_Contains_int(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Max_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Count_as_compiled_query() { - return base.Inline_collection_Max_with_two_values(async); + return base.Parameter_collection_in_subquery_Count_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Min_with_three_values(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection() { - return base.Inline_collection_Min_with_three_values(async); + return base.Parameter_collection_in_subquery_Union_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Min_with_two_values(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection_as_compiled_query() { - return base.Inline_collection_Min_with_two_values(async); + return base.Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_Max(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection_nested() { - return base.Inline_collection_of_nullable_value_type_Max(async); + return base.Parameter_collection_in_subquery_Union_column_collection_nested(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_Min(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_index_Column_equal_Column() { - return base.Inline_collection_of_nullable_value_type_Min(async); + return base.Parameter_collection_index_Column_equal_Column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_with_null_Max(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_index_Column_equal_constant() { - return base.Inline_collection_of_nullable_value_type_with_null_Max(async); + return base.Parameter_collection_index_Column_equal_constant(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_with_null_Min(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Where_with_EF_Constant_Where_Any() { - return base.Inline_collection_of_nullable_value_type_with_null_Min(async); + return base.Parameter_collection_Where_with_EF_Constant_Where_Any(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_value_index_Column(bool async) + + [NotSupportedByProviderFact] + public override Task Project_collection_of_datetimes_filtered() { - return base.Inline_collection_value_index_Column(async); + return base.Project_collection_of_datetimes_filtered(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_with_single_parameter_element_Count(bool async) + + [NotSupportedByProviderFact] + public override Task Project_collection_of_ints_ordered() { - return base.Inline_collection_with_single_parameter_element_Count(async); + return base.Project_collection_of_ints_ordered(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Count_with_column_predicate_with_EF_Constant(bool async) + [NotSupportedByProviderFact] + public override Task Project_collection_of_nullable_ints_with_paging2() { - return base.Parameter_collection_Count_with_column_predicate_with_EF_Constant(async); + return base.Project_collection_of_nullable_ints_with_paging2(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Where_with_EF_Constant_Where_Any(bool async) + [NotSupportedByProviderFact] + public override Task Project_empty_collection_of_nullables_and_collection_only_containing_nulls() { - return base.Parameter_collection_Where_with_EF_Constant_Where_Any(async); + return base.Project_empty_collection_of_nullables_and_collection_only_containing_nulls(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_inline_collection_with_Union(bool async) + [NotSupportedByProviderFact] + public override Task Project_inline_collection_with_Union() { - return base.Project_inline_collection_with_Union(async); + return base.Project_inline_collection_with_Union(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_ImmutableArray_of_ints_Contains_int(bool async) + [NotSupportedByProviderFact] + public override Task Project_multiple_collections() { - return base.Parameter_collection_ImmutableArray_of_ints_Contains_int(async); + return base.Project_multiple_collections(); } - PrimitiveCollectionsContext CreateContext() + [NotSupportedByProviderFact] + public override Task Values_of_enum_casted_to_underlying_value() { - return Fixture.CreateContext(); + return base.Values_of_enum_casted_to_underlying_value(); } public class PrimitiveCollectionsQueryFbFixture : PrimitiveCollectionsQueryFixtureBase, ITestSqlLoggerFactory diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs index 4df2ba1bb..2342605ac 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class SharedTypeQueryFbTest : SharedTypeQueryRelationalTestBase +public class SharedTypeQueryFbTest(NonSharedFixture fixture) : SharedTypeQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs index 52d10ed26..dd0a61306 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs @@ -31,6 +31,14 @@ public SqlQueryFbTest(NorthwindQueryFbFixture fixture) : base(fixture) { } + // Uses INTERSECT + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_two_parameters(bool async) + { + return base.Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_two_parameters(async); + } + [Theory(Skip = "Provider does the casting.")] [MemberData(nameof(IsAsyncData))] public override Task Bad_data_error_handling_invalid_cast(bool async) @@ -66,13 +74,6 @@ public override Task SqlQueryRaw_queryable_simple_projection_composed(bool async return base.SqlQueryRaw_queryable_simple_projection_composed(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_parameter_only_once(bool async) - { - return base.Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_parameter_only_once(async); - } - [DoesNotHaveTheDataTheory] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_with_dbParameter_mixed_in_subquery(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs index 7d91179dd..52df94ce7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs @@ -55,13 +55,6 @@ public override Task Group_by_on_StartsWith_with_null_parameter_as_argument(bool return base.Group_by_on_StartsWith_with_null_parameter_as_argument(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -181,13 +174,6 @@ public override Task DateTimeOffsetNow_minus_timespan(bool async) return base.DateTimeOffsetNow_minus_timespan(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool async) @@ -251,139 +237,6 @@ public override Task Subquery_inside_Take_argument(bool async) return base.Subquery_inside_Take_argument(async); } - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddDays(bool async) - { - return base.Where_DateOnly_AddDays(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddMonths(bool async) - { - return base.Where_DateOnly_AddMonths(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddYears(bool async) - { - return base.Where_DateOnly_AddYears(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Day(bool async) - { - return base.Where_DateOnly_Day(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_DayOfWeek(bool async) - { - return base.Where_DateOnly_DayOfWeek(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_DayOfYear(bool async) - { - return base.Where_DateOnly_DayOfYear(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Month(bool async) - { - return base.Where_DateOnly_Month(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Year(bool async) - { - return base.Where_DateOnly_Year(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool async) - { - return base.Where_datetimeoffset_date_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool async) - { - return base.Where_datetimeoffset_day_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool async) - { - return base.Where_datetimeoffset_dayofyear_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool async) - { - return base.Where_datetimeoffset_hour_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool async) - { - return base.Where_datetimeoffset_millisecond_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool async) - { - return base.Where_datetimeoffset_minute_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool async) - { - return base.Where_datetimeoffset_month_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool async) - { - return base.Where_datetimeoffset_now(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool async) - { - return base.Where_datetimeoffset_second_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool async) - { - return base.Where_datetimeoffset_year_component(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) @@ -393,83 +246,6 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) [NotSupportedByProviderTheory] [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_AddHours(bool async) - { - return base.Where_TimeOnly_AddHours(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_AddMinutes(bool async) - { - return base.Where_TimeOnly_AddMinutes(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Hour(bool async) - { - return base.Where_TimeOnly_Hour(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Millisecond(bool async) - { - return base.Where_TimeOnly_Millisecond(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Minute(bool async) - { - return base.Where_TimeOnly_Minute(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Second(bool async) - { - return base.Where_TimeOnly_Second(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - - [Theory(Skip = "Different implicit ordering on Firebird.")] - [MemberData(nameof(IsAsyncData))] public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down1(bool async) { return base.Take_without_orderby_followed_by_orderBy_is_pushed_down1(async); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs index d0c129d2c..5c1e9ea91 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs @@ -97,83 +97,6 @@ public override Task DateTimeOffset_Date_returns_datetime(bool async) return base.DateTimeOffset_Date_returns_datetime(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool async) - { - return base.Where_datetimeoffset_date_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool async) - { - return base.Where_datetimeoffset_day_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool async) - { - return base.Where_datetimeoffset_dayofyear_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool async) - { - return base.Where_datetimeoffset_hour_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool async) - { - return base.Where_datetimeoffset_millisecond_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool async) - { - return base.Where_datetimeoffset_minute_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool async) - { - return base.Where_datetimeoffset_month_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool async) - { - return base.Where_datetimeoffset_now(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool async) - { - return base.Where_datetimeoffset_second_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool async) - { - return base.Where_datetimeoffset_year_component(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool async) @@ -244,13 +167,6 @@ public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down2(bo return base.Take_without_orderby_followed_by_orderBy_is_pushed_down2(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -314,20 +230,6 @@ public override Task Correlated_collections_with_Distinct(bool async) return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) @@ -356,36 +258,8 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) return base.Non_string_concat_uses_appropriate_type_mapping(async); } - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - [Theory(Skip = "NETProvider#1008")] [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory(Skip = "NETProvider#1009")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - - [Theory(Skip = "Different implicit ordering on Firebird.")] - [MemberData(nameof(IsAsyncData))] public override Task String_concat_with_null_conditional_argument(bool async) { return base.String_concat_with_null_conditional_argument(async); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs index 6867be489..1c96f220c 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs @@ -25,7 +25,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class ToSqlQueryFbTest : ToSqlQueryTestBase +public class ToSqlQueryFbTest(NonSharedFixture fixture) : ToSqlQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs new file mode 100644 index 000000000..ed7c88566 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs @@ -0,0 +1,100 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System; +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestModels.BasicTypesModel; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class BasicTypesQueryFbFixture : BasicTypesQueryFixtureBase, ITestSqlLoggerFactory +{ + private BasicTypesData _expectedData; + + protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + + public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; + + protected override Task SeedAsync(BasicTypesContext context) + { + _expectedData ??= CreateExpectedData(); + context.AddRange(_expectedData.BasicTypesEntities); + context.AddRange(_expectedData.NullableBasicTypesEntities); + return context.SaveChangesAsync(); + } + + public override ISetSource GetExpectedData() + => _expectedData ??= CreateExpectedData(); + + private BasicTypesData CreateExpectedData() + { + var expectedData = (BasicTypesData)base.GetExpectedData(); + foreach (var entry in expectedData.BasicTypesEntities) + { + // For all Temporal types Firebird supports up to 1/10ths of a millisecond precision + entry.DateTime = RoundToFirebirdPrecision(entry.DateTime); + entry.TimeOnly = RoundToFirebirdPrecision(entry.TimeOnly); + entry.TimeSpan = RoundToFirebirdPrecision(entry.TimeSpan); + entry.DateTimeOffset = RoundToFirebirdPrecision(entry.DateTimeOffset); + } + + // Do the same for the nullable counterparts + foreach (var entry in expectedData.NullableBasicTypesEntities) + { + if (entry.DateTime.HasValue) + { + entry.DateTime = RoundToFirebirdPrecision(entry.DateTime.Value); + } + + if (entry.TimeOnly.HasValue) + { + entry.TimeOnly = RoundToFirebirdPrecision(entry.TimeOnly.Value); + } + + if (entry.TimeSpan.HasValue) + { + entry.TimeSpan = RoundToFirebirdPrecision(entry.TimeSpan.Value); + } + + if (entry.DateTimeOffset.HasValue) + { + entry.DateTimeOffset = RoundToFirebirdPrecision(entry.DateTimeOffset.Value); + } + } + + return expectedData; + } + + private static DateTime RoundToFirebirdPrecision(DateTime dateTime) + => new (StripSubDeciMillisecond(dateTime.Ticks), dateTime.Kind); + + private static DateTimeOffset RoundToFirebirdPrecision(DateTimeOffset dateTimeOffset) + => new (StripSubDeciMillisecond(dateTimeOffset.Ticks), TimeSpan.Zero); + + private static TimeOnly RoundToFirebirdPrecision(TimeOnly timeOnly) + => new (StripSubDeciMillisecond(timeOnly.Ticks)); + + private static TimeSpan RoundToFirebirdPrecision(TimeSpan timeOnly) + => new (StripSubDeciMillisecond(timeOnly.Ticks)); + + static long StripSubDeciMillisecond(long ticks) => ticks - (ticks % (TimeSpan.TicksPerMillisecond / 10)); +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs new file mode 100644 index 000000000..3ecf0647e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs @@ -0,0 +1,45 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class ByteArrayTranslationsFbTest : ByteArrayTranslationsTestBase +{ + public ByteArrayTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task First() + { + return base.First(); + } + + [NotSupportedByProviderFact] + public override Task Index() + { + return base.Index(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs new file mode 100644 index 000000000..4dd719401 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs @@ -0,0 +1,38 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class EnumTranslationsFbTest : EnumTranslationsTestBase +{ + public EnumTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + protected override void ClearLog() + { + Fixture.TestSqlLoggerFactory.Clear(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs new file mode 100644 index 000000000..ab3c3fd0a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs @@ -0,0 +1,31 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class GuidTranslationsFbTest : GuidTranslationsTestBase +{ + public GuidTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs new file mode 100644 index 000000000..25869915a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs @@ -0,0 +1,222 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class MathTranslationsFbTest : MathTranslationsTestBase +{ + public MathTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Acos_float() + { + return base.Acos_float(); + } + + [NotSupportedByProviderFact] + public override Task Acosh() + { + return base.Acosh(); + } + + [NotSupportedByProviderFact] + public override Task Asin_float() + { + return base.Asin_float(); + } + + [NotSupportedByProviderFact] + public override Task Asinh() + { + return base.Asinh(); + } + + [NotSupportedByProviderFact] + public override Task Atan_float() + { + return base.Atan_float(); + } + + [NotSupportedByProviderFact] + public override Task Atanh() + { + return base.Atanh(); + } + + [NotSupportedByProviderFact] + public override Task Atan2_float() + { + return base.Atan2_float(); + } + + [NotSupportedByProviderFact] + public override Task Ceiling_float() + { + return base.Ceiling_float(); + } + + [NotSupportedByProviderFact] + public override Task Cos_float() + { + return base.Cos_float(); + } + + [NotSupportedByProviderFact] + public override Task Cosh() + { + return base.Cosh(); + } + + [NotSupportedByProviderFact] + public override Task Degrees() + { + return base.Degrees(); + } + + [NotSupportedByProviderFact] + public override Task Degrees_float() + { + return base.Degrees_float(); + } + + [NotSupportedByProviderFact] + public override Task Exp_float() + { + return base.Exp_float(); + } + + [NotSupportedByProviderFact] + public override Task Floor_float() + { + return base.Floor_float(); + } + + [NotSupportedByProviderFact] + public override Task Log_float() + { + return base.Log_float(); + } + + [NotSupportedByProviderFact] + public override Task Log_with_newBase_float() + { + return base.Log_with_newBase_float(); + } + + [NotSupportedByProviderFact] + public override Task Log10_float() + { + return base.Log10_float(); + } + + [NotSupportedByProviderFact] + public override Task Log2() + { + return base.Log2(); + } + + [NotSupportedByProviderFact] + public override Task Power_float() + { + return base.Power_float(); + } + + [NotSupportedByProviderFact] + public override Task Radians() + { + return base.Radians(); + } + + [NotSupportedByProviderFact] + public override Task Radians_float() + { + return base.Radians_float(); + } + + [NotSupportedByProviderFact] + public override Task Round_float() + { + return base.Round_float(); + } + + [NotSupportedByProviderFact] + public override Task Round_with_digits_float() + { + return base.Round_with_digits_float(); + } + + [NotSupportedByProviderFact] + public override Task Sign_float() + { + return base.Sign_float(); + } + + [NotSupportedByProviderFact] + public override Task Sin_float() + { + return base.Sin_float(); + } + + [NotSupportedByProviderFact] + public override Task Sinh() + { + return base.Sinh(); + } + + [NotSupportedByProviderFact] + public override Task Sqrt_float() + { + return base.Sqrt_float(); + } + + [NotSupportedByProviderFact] + public override Task Tan_float() + { + return base.Tan_float(); + } + + [NotSupportedByProviderFact] + public override Task Tanh() + { + return base.Tanh(); + } + + [NotSupportedByProviderFact] + public override Task Truncate_float() + { + return base.Truncate_float(); + } + + // Round itself works here, but the where clause (255.1) is not translated correctly (255.09999) due to floating point error + [NotSupportedByProviderFact] + public override Task Round_with_digits_double() + { + return base.Round_with_digits_double(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs new file mode 100644 index 000000000..76bc8bf36 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs @@ -0,0 +1,85 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class MiscellaneousTranslationsFbTest : MiscellaneousTranslationsRelationalTestBase +{ + public MiscellaneousTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToBoolean() + { + return base.Convert_ToBoolean(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToByte() + { + return base.Convert_ToByte(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToDecimal() + { + return base.Convert_ToDecimal(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToDouble() + { + return base.Convert_ToDouble(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt16() + { + return base.Convert_ToInt16(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt32() + { + return base.Convert_ToInt32(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt64() + { + return base.Convert_ToInt64(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToString() + { + return base.Convert_ToString(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..c575858ae --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class ArithmeticOperatorTranslationsFbTest : ArithmeticOperatorTranslationsTestBase +{ + public ArithmeticOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..b21abe185 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs @@ -0,0 +1,42 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class BitwiseOperatorTranslationsFbTest : BitwiseOperatorTranslationsTestBase +{ + public BitwiseOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Left_shift() + => base.Left_shift(); + + [NotSupportedByProviderFact] + public override Task Right_shift() + => base.Right_shift(); +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..a6eaa34a2 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class ComparisonOperatorTranslationsFbTest : ComparisonOperatorTranslationsTestBase +{ + public ComparisonOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..88dc4d17c --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class LogicalOperatorTranslationsFbTest : LogicalOperatorTranslationsTestBase +{ + public LogicalOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..8597e053e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class MiscellaneousOperatorTranslationsFbTest : MiscellaneousOperatorTranslationsTestBase +{ + public MiscellaneousOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs new file mode 100644 index 000000000..025827939 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs @@ -0,0 +1,196 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class StringTranslationsFbTest : StringTranslationsRelationalTestBase +{ + public StringTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + protected override void ClearLog() + { + Fixture.TestSqlLoggerFactory.Clear(); + } + + [NotSupportedOnFirebirdFact] + public override Task TrimStart_with_char_array_argument() + { + return base.TrimStart_with_char_array_argument(); + } + + [NotSupportedOnFirebirdFact] + public override Task TrimEnd_with_char_array_argument() + { + return base.TrimEnd_with_char_array_argument(); + } + + [NotSupportedOnFirebirdFact] + public override Task Trim_with_char_array_argument_in_predicate() + { + return base.Trim_with_char_array_argument_in_predicate(); + } + + [NotSupportedByProviderFact] + public override Task Regex_IsMatch() + { + return base.Regex_IsMatch(); + } + + [NotSupportedByProviderFact] + public override Task Regex_IsMatch_constant_input() + { + return base.Regex_IsMatch_constant_input(); + } + + [ConditionalFact] + public override Task Join_non_aggregate() + { + return AssertTranslationFailed(() => base.Join_non_aggregate()); + } + + [NotSupportedByProviderFact] + public override Task Contains_Literal_Char() + { + return base.Contains_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task Contains_with_StringComparison_Ordinal() + { + return base.Contains_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Contains_with_StringComparison_OrdinalIgnoreCase() + { + return base.Contains_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_Literal_Char() + { + return base.EndsWith_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_Parameter_Char() + { + return base.EndsWith_Parameter_Char(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_with_StringComparison_Ordinal() + { + return base.EndsWith_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_with_StringComparison_OrdinalIgnoreCase() + { + return base.EndsWith_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task Equals_with_Ordinal() + { + return base.Equals_with_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Equals_with_OrdinalIgnoreCase() + { + return base.Equals_with_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_Char() + { + return base.IndexOf_Char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_constant_starting_position_char() + { + return base.IndexOf_with_constant_starting_position_char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_one_parameter_arg_char() + { + return base.IndexOf_with_one_parameter_arg_char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_parameter_starting_position_char() + { + return base.IndexOf_with_parameter_starting_position_char(); + } + + [NotSupportedByProviderFact] + public override Task Replace_Char() + { + return base.Replace_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_Literal_Char() + { + return base.StartsWith_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_Parameter_Char() + { + return base.StartsWith_Parameter_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_with_StringComparison_Ordinal() + { + return base.StartsWith_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_with_StringComparison_OrdinalIgnoreCase() + { + return base.StartsWith_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task Static_Equals_with_Ordinal() + { + return base.Static_Equals_with_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Static_Equals_with_OrdinalIgnoreCase() + { + return base.Static_Equals_with_OrdinalIgnoreCase(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs new file mode 100644 index 000000000..898a44502 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateOnlyTranslationsFbTest : DateOnlyTranslationsTestBase +{ + public DateOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task DayNumber() + { + return base.DayNumber(); + } + + [NotSupportedByProviderFact] + public override Task DayNumber_subtraction() + { + return base.DayNumber_subtraction(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_constant_DateTime_with_property_TimeOnly() + { + return base.ToDateTime_constant_DateTime_with_property_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_property_with_constant_TimeOnly() + { + return base.ToDateTime_property_with_constant_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_property_with_property_TimeOnly() + { + return base.ToDateTime_property_with_property_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_with_complex_DateTime() + { + return base.ToDateTime_with_complex_DateTime(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_with_complex_TimeOnly() + { + return base.ToDateTime_with_complex_TimeOnly(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs new file mode 100644 index 000000000..99e4f57ea --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs @@ -0,0 +1,139 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateTimeOffsetTranslationsFbTest : DateTimeOffsetTranslationsTestBase +{ + public DateTimeOffsetTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task Now() + { + return base.Now(); + } + + [NotSupportedOnFirebirdFact] + public override Task UtcNow() + { + return base.UtcNow(); + } + + [NotSupportedOnFirebirdFact] + public override Task AddMilliseconds() + { + return base.AddMilliseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task AddMinutes() + { + return base.AddMinutes(); + } + + [NotSupportedOnFirebirdFact] + public override Task Date() + { + return base.Date(); + } + + [NotSupportedOnFirebirdFact] + public override Task Day() + { + return base.Day(); + } + + [NotSupportedOnFirebirdFact] + public override Task DayOfYear() + { + return base.DayOfYear(); + } + + [NotSupportedOnFirebirdFact] + public override Task Hour() + { + return base.Hour(); + } + + [NotSupportedOnFirebirdFact] + public override Task Microsecond() + { + return base.Microsecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Millisecond() + { + return base.Millisecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Minute() + { + return base.Minute(); + } + + [NotSupportedOnFirebirdFact] + public override Task Month() + { + return base.Month(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanosecond() + { + return base.Nanosecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Second() + { + return base.Second(); + } + + [NotSupportedOnFirebirdFact] + public override Task ToUnixTimeMilliseconds() + { + return base.ToUnixTimeMilliseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task ToUnixTimeSecond() + { + return base.ToUnixTimeSecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Year() + { + return base.Year(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs new file mode 100644 index 000000000..39e0c94b0 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateTimeTranslationsFbTest : DateTimeTranslationsTestBase +{ + public DateTimeTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task UtcNow() + { + return base.UtcNow(); + } + + [NotSupportedByProviderFact] + public override Task subtract_and_TotalDays() + { + return base.subtract_and_TotalDays(); + } + + [NotSupportedByProviderFact] + public override Task TimeOfDay() + { + return base.TimeOfDay(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs new file mode 100644 index 000000000..663105e06 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs @@ -0,0 +1,65 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class TimeOnlyTranslationsFbTest : TimeOnlyTranslationsTestBase +{ + public TimeOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Add_TimeSpan() + { + return base.Add_TimeSpan(); + } + + [NotSupportedByProviderFact] + public override Task IsBetween() + { + return base.IsBetween(); + } + + [NotSupportedOnFirebirdFact] + public override Task Microsecond() + { + return base.Microsecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanosecond() + { + return base.Nanosecond(); + } + + [NotSupportedByProviderFact] + public override Task Subtract() + { + return base.Subtract(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs new file mode 100644 index 000000000..c853a74f2 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs @@ -0,0 +1,49 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class TimeSpanTranslationsFbTest : TimeSpanTranslationsTestBase +{ + public TimeSpanTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedOnFirebirdFact] + public override Task Microseconds() + { + return base.Microseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanoseconds() + { + return base.Nanoseconds(); + } + + +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs index 144862c74..c8bccb74d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs @@ -16,6 +16,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using System; +using System.Data; using System.Threading.Tasks; using FirebirdSql.Data.FirebirdClient; using FirebirdSql.Data.Services; @@ -42,8 +43,15 @@ public FbTestStore(string name, bool shared) public Version ServerVersion { get; private set; } public bool ServerLessThan4() => ServerVersion < new Version(4, 0, 0, 0); + public bool ServerLessThan5() => ServerVersion < new Version(5, 0, 0, 0); + protected override async Task InitializeAsync(Func createContext, Func seed, Func clean) { + if (Connection.State != ConnectionState.Closed) + { + // Connections are maintained between tests, they have to be closed to create a new database + await Connection.CloseAsync(); + } // create database explicitly to specify Page Size and Forced Writes await FbConnection.CreateDatabaseAsync(ConnectionString, pageSize: 16384, forcedWrites: false, overwrite: true); await using (var context = createContext()) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs index 495717e39..d96b23fc8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs @@ -26,7 +26,7 @@ public FbQueryRootProcessor(QueryTranslationPreprocessorDependencies dependencie : base(dependencies, relationalDependencies, queryCompilationContext) { } - protected override bool ShouldConvertToParameterQueryRoot(ParameterExpression constantExpression) + protected override bool ShouldConvertToParameterQueryRoot(QueryParameterExpression constantExpression) { return false; } diff --git a/src/Versions.props b/src/Versions.props index 25b76c150..3be7465ce 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -7,7 +7,7 @@ 12.0.0 10.3.2 - 9.0.1 + 10.0.0