diff --git a/src/EFCore/Query/QueryContext.cs b/src/EFCore/Query/QueryContext.cs
index e42711a1f43..6e159102b3c 100644
--- a/src/EFCore/Query/QueryContext.cs
+++ b/src/EFCore/Query/QueryContext.cs
@@ -113,15 +113,9 @@ public virtual void AddParameter(string name, object? value)
///
/// Whether a stand-alone should be created to perform identity resolution.
public virtual void InitializeStateManager(bool standAlone = false)
- {
- Check.DebugAssert(
- _stateManager == null,
- "The 'InitializeStateManager' method has been called multiple times on the current query context. This method is intended to be called only once before query enumeration starts.");
-
- _stateManager = standAlone
+ => _stateManager ??= standAlone
? new StateManager(Dependencies.StateManager.Dependencies)
: Dependencies.StateManager;
- }
///
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindDbFunctionsQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindDbFunctionsQueryCosmosTest.cs
index 0b26dd119e0..b914dd47f1d 100644
--- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindDbFunctionsQueryCosmosTest.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindDbFunctionsQueryCosmosTest.cs
@@ -13,20 +13,44 @@ public NorthwindDbFunctionsQueryCosmosTest(
ClearLog();
}
- public override Task Like_all_literals(bool async)
- => AssertTranslationFailed(() => base.Like_all_literals(async));
+ [ConditionalFact]
+ public virtual void Check_all_tests_overridden()
+ => TestHelpers.AssertAllMethodsOverridden(GetType());
- public override Task Like_all_literals_with_escape(bool async)
- => AssertTranslationFailed(() => base.Like_all_literals_with_escape(async));
+ public override async Task Like_all_literals(bool async)
+ {
+ await AssertTranslationFailed(() => base.Like_all_literals(async));
+
+ AssertSql();
+ }
+
+ public override async Task Like_all_literals_with_escape(bool async)
+ {
+ await AssertTranslationFailed(() => base.Like_all_literals_with_escape(async));
+
+ AssertSql();
+ }
+
+ public override async Task Like_literal(bool async)
+ {
+ await AssertTranslationFailed(() => base.Like_literal(async));
+
+ AssertSql();
+ }
+
+ public override async Task Like_literal_with_escape(bool async)
+ {
+ await AssertTranslationFailed(() => base.Like_literal_with_escape(async));
- public override Task Like_literal(bool async)
- => AssertTranslationFailed(() => base.Like_literal(async));
+ AssertSql();
+ }
- public override Task Like_literal_with_escape(bool async)
- => AssertTranslationFailed(() => base.Like_literal_with_escape(async));
+ public override async Task Like_identity(bool async)
+ {
+ await AssertTranslationFailed(() => base.Like_identity(async));
- public override Task Like_identity(bool async)
- => AssertTranslationFailed(() => base.Like_identity(async));
+ AssertSql();
+ }
public override async Task Random_return_less_than_1(bool async)
{
diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs
index 7c8837bd685..8fdf80c9cc7 100644
--- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.Azure.Cosmos;
using Microsoft.EntityFrameworkCore.TestModels.Northwind;
namespace Microsoft.EntityFrameworkCore.Query;
@@ -16,6 +17,10 @@ public NorthwindFunctionsQueryCosmosTest(
//Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
}
+ [ConditionalFact]
+ public virtual void Check_all_tests_overridden()
+ => TestHelpers.AssertAllMethodsOverridden(GetType());
+
public override async Task String_StartsWith_Literal(bool async)
{
await base.String_StartsWith_Literal(async);
@@ -155,136 +160,100 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND CONTAINS(c[""ContactName""], ""M""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_simple_zero(bool async)
{
- await base.String_Compare_simple_zero(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_simple_zero(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_simple_one(bool async)
{
- await base.String_Compare_simple_one(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_simple_one(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_compare_with_parameter(bool async)
{
- await base.String_compare_with_parameter(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_compare_with_parameter(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_simple_more_than_one(bool async)
{
- await base.String_Compare_simple_more_than_one(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_simple_more_than_one(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_nested(bool async)
{
- await base.String_Compare_nested(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_nested(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_multi_predicate(bool async)
{
- await base.String_Compare_multi_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_multi_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_to_simple_zero(bool async)
{
- await base.String_Compare_to_simple_zero(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_to_simple_zero(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_to_simple_one(bool async)
{
- await base.String_Compare_to_simple_one(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_to_simple_one(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_compare_to_with_parameter(bool async)
{
- await base.String_compare_to_with_parameter(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_compare_to_with_parameter(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_to_simple_more_than_one(bool async)
{
- await base.String_Compare_to_simple_more_than_one(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_to_simple_more_than_one(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_to_nested(bool async)
{
- await base.String_Compare_to_nested(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_to_nested(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task String_Compare_to_multi_predicate(bool async)
{
- await base.String_Compare_to_multi_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.String_Compare_to_multi_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task Where_math_abs1(bool async)
@@ -327,18 +296,14 @@ FROM root c
WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""UnitPrice""] < 7.0)) AND (10 < c[""ProductID""]))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_ceiling1(bool async)
{
- await base.Where_math_ceiling1(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_ceiling1(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_ceiling2(bool async)
{
await base.Where_math_ceiling2(async);
@@ -346,7 +311,7 @@ public override async Task Where_math_ceiling2(bool async)
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""Quantity""] < 5)) AND (CEILING(c[""UnitPrice""]) > 10.0))");
}
public override async Task Where_math_floor(bool async)
@@ -359,26 +324,20 @@ FROM root c
WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""Quantity""] < 5)) AND (FLOOR(c[""UnitPrice""]) > 10.0))");
}
- [ConditionalTheory(Skip = "Issue #25120")]
public override async Task Where_math_power(bool async)
{
- await base.Where_math_power(async);
+ // Convert node. Issue #25120.
+ await AssertTranslationFailed(() => base.Where_math_power(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #25120")]
public override async Task Where_math_square(bool async)
{
- await base.Where_math_square(async);
+ // Convert node. Issue #25120.
+ await AssertTranslationFailed(() => base.Where_math_square(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
public override async Task Where_math_round(bool async)
@@ -411,15 +370,12 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10250))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_round2(bool async)
{
- await base.Where_math_round2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_round2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (ROUND(c[""UnitPrice""]) > 100.0))");
+ AssertSql();
}
public override async Task Where_math_truncate(bool async)
@@ -432,136 +388,100 @@ FROM root c
WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""Quantity""] < 5)) AND (TRUNC(c[""UnitPrice""]) > 10.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_exp(bool async)
{
- await base.Where_math_exp(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_exp(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_log10(bool async)
{
- await base.Where_math_log10(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_log10(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0)))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_log(bool async)
{
- await base.Where_math_log(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_log(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0)))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_log_new_base(bool async)
{
- await base.Where_math_log_new_base(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_log_new_base(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0)))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_sqrt(bool async)
{
- await base.Where_math_sqrt(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_sqrt(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_acos(bool async)
{
- await base.Where_math_acos(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_acos(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_asin(bool async)
{
- await base.Where_math_asin(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_asin(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_atan(bool async)
{
- await base.Where_math_atan(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_atan(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_atan2(bool async)
{
- await base.Where_math_atan2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_atan2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_cos(bool async)
{
- await base.Where_math_cos(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_cos(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_sin(bool async)
{
- await base.Where_math_sin(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_sin(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_tan(bool async)
{
- await base.Where_math_tan(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_tan(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
public override async Task Where_math_sign(bool async)
@@ -574,62 +494,48 @@ FROM root c
WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (SIGN(c[""Discount""]) > 0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_min(bool async)
{
- await base.Where_math_min(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_min(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_math_max(bool async)
{
- await base.Where_math_max(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_math_max(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_abs1(bool async)
{
- await base.Where_mathf_abs1(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_mathf_abs1(async));
- AssertSql(
- @"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock]
-FROM [Products] AS [p]
-WHERE ABS(CAST([p].[ProductID] AS real)) > CAST(10 AS real)");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_ceiling1(bool async)
{
await base.Where_mathf_ceiling1(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[UnitPrice] < 7.0) AND (CEILING([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""UnitPrice""] < 7.0)) AND (CEILING(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_floor(bool async)
{
- await base.Where_mathf_floor(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_mathf_floor(async));
- AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[Quantity] < CAST(5 AS smallint)) AND (FLOOR(CAST([o].[UnitPrice] AS real)) > CAST(10 AS real))");
+ AssertSql();
}
- [ConditionalTheory]
public override async Task Where_mathf_power(bool async)
{
await base.Where_mathf_power(async);
@@ -640,7 +546,6 @@ FROM root c
WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (POWER(c[""Discount""], 3.0) > 0.005))");
}
- [ConditionalTheory]
public override async Task Where_mathf_square(bool async)
{
await base.Where_mathf_square(async);
@@ -651,180 +556,158 @@ FROM root c
WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (POWER(c[""Discount""], 2.0) > 0.05))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_round2(bool async)
{
- await base.Where_mathf_round2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_mathf_round2(async));
- AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ROUND(CAST([o].[UnitPrice] AS real), 2) > CAST(100 AS real)");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_truncate(bool async)
{
- await base.Where_mathf_truncate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_mathf_truncate(async));
- AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[Quantity] < CAST(5 AS smallint)) AND (ROUND(CAST([o].[UnitPrice] AS real), 0, 1) > CAST(10 AS real))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_exp(bool async)
{
await base.Where_mathf_exp(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (EXP([o].[Discount]) > CAST(1 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (EXP(c[""Discount""]) > 1.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_log10(bool async)
{
await base.Where_mathf_log10(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE (([o].[OrderID] = 11077) AND ([o].[Discount] > CAST(0 AS real))) AND (LOG10([o].[Discount]) < CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0))) AND (LOG10(c[""Discount""]) < 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_log(bool async)
{
await base.Where_mathf_log(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE (([o].[OrderID] = 11077) AND ([o].[Discount] > CAST(0 AS real))) AND (LOG([o].[Discount]) < CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0))) AND (LOG(c[""Discount""]) < 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_log_new_base(bool async)
{
await base.Where_mathf_log_new_base(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE (([o].[OrderID] = 11077) AND ([o].[Discount] > CAST(0 AS real))) AND (LOG([o].[Discount], CAST(7 AS real)) < CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 11077) AND (c[""Discount""] > 0.0))) AND (LOG(c[""Discount""], 7.0) < 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_sqrt(bool async)
{
await base.Where_mathf_sqrt(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (SQRT([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (SQRT(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_acos(bool async)
{
await base.Where_mathf_acos(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (ACOS([o].[Discount]) > CAST(1 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (ACOS(c[""Discount""]) > 1.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_asin(bool async)
{
await base.Where_mathf_asin(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (ASIN([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (ASIN(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_atan(bool async)
{
await base.Where_mathf_atan(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (ATAN([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (ATAN(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_atan2(bool async)
{
await base.Where_mathf_atan2(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (ATN2([o].[Discount], CAST(1 AS real)) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (ATN2(c[""Discount""], 1.0) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_cos(bool async)
{
await base.Where_mathf_cos(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (COS([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (COS(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_sin(bool async)
{
await base.Where_mathf_sin(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (SIN([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (SIN(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_tan(bool async)
{
await base.Where_mathf_tan(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (TAN([o].[Discount]) > CAST(0 AS real))");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (TAN(c[""Discount""]) > 0.0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_mathf_sign(bool async)
{
await base.Where_mathf_sign(async);
AssertSql(
- @"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice]
-FROM [Order Details] AS [o]
-WHERE ([o].[OrderID] = 11077) AND (SIGN([o].[Discount]) > 0)");
+ @"SELECT c
+FROM root c
+WHERE (((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 11077)) AND (SIGN(c[""Discount""]) > 0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_guid_newguid(bool async)
{
- await base.Where_guid_newguid(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_guid_newguid(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
public override async Task Where_string_to_upper(bool async)
@@ -847,103 +730,76 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (LOWER(c[""CustomerID""]) = ""alfki""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_functions_nested(bool async)
{
- await base.Where_functions_nested(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_functions_nested(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToBoolean(bool async)
{
- await base.Convert_ToBoolean(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToBoolean(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToByte(bool async)
{
- await base.Convert_ToByte(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToByte(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToDecimal(bool async)
{
- await base.Convert_ToDecimal(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToDecimal(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToDouble(bool async)
{
- await base.Convert_ToDouble(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToDouble(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToInt16(bool async)
{
- await base.Convert_ToInt16(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToInt16(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToInt32(bool async)
{
- await base.Convert_ToInt32(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToInt32(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToInt64(bool async)
{
- await base.Convert_ToInt64(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToInt64(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Convert_ToString(bool async)
{
- await base.Convert_ToString(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Convert_ToString(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
public override async Task Indexof_with_emptystring(bool async)
@@ -1070,28 +926,29 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task IsNullOrEmpty_in_predicate(bool async)
{
- await base.IsNullOrEmpty_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.IsNullOrEmpty_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task IsNullOrEmpty_negated_in_predicate(bool async)
{
- await base.IsNullOrEmpty_negated_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.IsNullOrEmpty_negated_in_predicate(async));
- AssertSql(@"");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task IsNullOrWhiteSpace_in_predicate_on_non_nullable_column(bool async)
- => base.IsNullOrWhiteSpace_in_predicate_on_non_nullable_column(async);
+ public override async Task IsNullOrWhiteSpace_in_predicate_on_non_nullable_column(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.IsNullOrWhiteSpace_in_predicate_on_non_nullable_column(async));
+
+ AssertSql();
+ }
public override async Task IsNullOrEmpty_in_projection(bool async)
{
@@ -1113,15 +970,12 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task IsNullOrWhiteSpace_in_predicate(bool async)
{
- await base.IsNullOrWhiteSpace_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.IsNullOrWhiteSpace_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task TrimStart_without_arguments_in_predicate(bool async)
@@ -1134,26 +988,20 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (LTRIM(c[""ContactTitle""]) = ""Owner""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task TrimStart_with_char_argument_in_predicate(bool async)
{
- await base.TrimStart_with_char_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.TrimStart_with_char_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task TrimStart_with_char_array_argument_in_predicate(bool async)
{
- await base.TrimStart_with_char_array_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.TrimStart_with_char_array_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task TrimEnd_without_arguments_in_predicate(bool async)
@@ -1166,26 +1014,20 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (RTRIM(c[""ContactTitle""]) = ""Owner""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task TrimEnd_with_char_argument_in_predicate(bool async)
{
- await base.TrimEnd_with_char_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.TrimEnd_with_char_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task TrimEnd_with_char_array_argument_in_predicate(bool async)
{
- await base.TrimEnd_with_char_array_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.TrimEnd_with_char_array_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task Trim_without_argument_in_predicate(bool async)
@@ -1198,48 +1040,40 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (TRIM(c[""ContactTitle""]) = ""Owner""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Trim_with_char_argument_in_predicate(bool async)
{
- await base.Trim_with_char_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Trim_with_char_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Trim_with_char_array_argument_in_predicate(bool async)
{
- await base.Trim_with_char_array_argument_in_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Trim_with_char_array_argument_in_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Order_by_length_twice(bool async)
{
- await base.Order_by_length_twice(async);
+ // Unsupported ORDER BY clause. Issue #27037.
+ await Assert.ThrowsAsync(() => base.Order_by_length_twice(async));
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+WHERE (c[""Discriminator""] = ""Customer"")
+ORDER BY LENGTH(c[""CustomerID""]), c[""CustomerID""]");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Order_by_length_twice_followed_by_projection_of_naked_collection_navigation(bool async)
{
- await base.Order_by_length_twice_followed_by_projection_of_naked_collection_navigation(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Order_by_length_twice_followed_by_projection_of_naked_collection_navigation(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task Static_string_equals_in_predicate(bool async)
@@ -1252,18 +1086,18 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ANATR""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Static_equals_nullable_datetime_compared_to_non_nullable(bool async)
{
await base.Static_equals_nullable_datetime_compared_to_non_nullable(async);
AssertSql(
- @"SELECT c
+ @"@__arg_0='1996-07-04T00:00:00'
+
+SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderDate""] = @__arg_0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Static_equals_int_compared_to_long(bool async)
{
await base.Static_equals_int_compared_to_long(async);
@@ -1271,59 +1105,72 @@ public override async Task Static_equals_int_compared_to_long(bool async)
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+WHERE ((c[""Discriminator""] = ""Order"") AND false)");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Projecting_Math_Truncate_and_ordering_by_it_twice(bool async)
{
- await base.Projecting_Math_Truncate_and_ordering_by_it_twice(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Projecting_Math_Truncate_and_ordering_by_it_twice(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10250))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Projecting_Math_Truncate_and_ordering_by_it_twice2(bool async)
{
- await base.Projecting_Math_Truncate_and_ordering_by_it_twice2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Projecting_Math_Truncate_and_ordering_by_it_twice2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10250))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Projecting_Math_Truncate_and_ordering_by_it_twice3(bool async)
{
- await base.Projecting_Math_Truncate_and_ordering_by_it_twice3(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Projecting_Math_Truncate_and_ordering_by_it_twice3(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10250))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue#17246")]
- public override Task DateTime_Compare_to_simple_zero(bool async, bool compareTo)
- => base.DateTime_Compare_to_simple_zero(async, compareTo);
+ public override async Task DateTime_Compare_to_simple_zero(bool async, bool compareTo)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.DateTime_Compare_to_simple_zero(async, compareTo));
- [ConditionalTheory(Skip = "Issue#17246")]
- public override Task TimeSpan_Compare_to_simple_zero(bool async, bool compareTo)
- => base.TimeSpan_Compare_to_simple_zero(async, compareTo);
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Int_Compare_to_simple_zero(bool async)
- => base.Int_Compare_to_simple_zero(async);
+ public override async Task TimeSpan_Compare_to_simple_zero(bool async, bool compareTo)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.TimeSpan_Compare_to_simple_zero(async, compareTo));
- public override Task Regex_IsMatch_MethodCall(bool async)
- => AssertTranslationFailed(() => base.Regex_IsMatch_MethodCall(async));
+ AssertSql();
+ }
+
+ public override async Task Int_Compare_to_simple_zero(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Int_Compare_to_simple_zero(async));
- public override Task Regex_IsMatch_MethodCall_constant_input(bool async)
- => AssertTranslationFailed(() => base.Regex_IsMatch_MethodCall_constant_input(async));
+ AssertSql();
+ }
+
+ public override async Task Regex_IsMatch_MethodCall(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Regex_IsMatch_MethodCall(async));
+
+ AssertSql();
+ }
+
+ public override async Task Regex_IsMatch_MethodCall_constant_input(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Regex_IsMatch_MethodCall_constant_input(async));
+
+ AssertSql();
+ }
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
@@ -1385,9 +1232,75 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND STRINGEQUALS(c[""CustomerID""], ""ALFKI""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Datetime_subtraction_TotalDays(bool async)
- => base.Datetime_subtraction_TotalDays(async);
+ public override async Task Datetime_subtraction_TotalDays(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Datetime_subtraction_TotalDays(async));
+
+ AssertSql();
+ }
+
+ public override async Task String_Contains_constant_with_whitespace(bool async)
+ {
+ await base.String_Contains_constant_with_whitespace(async);
+
+ AssertSql(
+ @"SELECT c
+FROM root c
+WHERE ((c[""Discriminator""] = ""Customer"") AND CONTAINS(c[""ContactName""], "" ""))");
+ }
+
+ public override async Task String_Contains_parameter_with_whitespace(bool async)
+ {
+ await base.String_Contains_parameter_with_whitespace(async);
+
+ AssertSql(
+ @"@__pattern_0=' '
+
+SELECT c
+FROM root c
+WHERE ((c[""Discriminator""] = ""Customer"") AND CONTAINS(c[""ContactName""], @__pattern_0))");
+ }
+
+ public override async Task Select_mathf_round(bool async)
+ {
+ await base.Select_mathf_round(async);
+
+ AssertSql(
+ @"SELECT c[""OrderID""]
+FROM root c
+WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10250))");
+ }
+
+ public override async Task Select_mathf_round2(bool async)
+ {
+ await base.Select_mathf_round2(async);
+
+ AssertSql(
+ @"SELECT c[""UnitPrice""]
+FROM root c
+WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""Quantity""] < 5))");
+ }
+
+ public override async Task Select_mathf_truncate(bool async)
+ {
+ await base.Select_mathf_truncate(async);
+
+ AssertSql(
+ @"SELECT c[""UnitPrice""]
+FROM root c
+WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""Quantity""] < 5))");
+ }
+
+ public override async Task Indexof_with_one_arg(bool async)
+ {
+ await base.Indexof_with_one_arg(async);
+
+ AssertSql(
+ @"SELECT INDEX_OF(c[""ContactName""], ""a"") AS c
+FROM root c
+WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ }
private void AssertSql(params string[] expected)
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);
diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs
index 8690cbcbc7c..cd8de23f708 100644
--- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using Microsoft.EntityFrameworkCore.TestModels.Northwind;
+using Xunit.Sdk;
namespace Microsoft.EntityFrameworkCore.Query;
@@ -17,7 +17,10 @@ public NorthwindKeylessEntitiesQueryCosmosTest(
//Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
}
- [ConditionalTheory]
+ [ConditionalFact]
+ public virtual void Check_all_tests_overridden()
+ => TestHelpers.AssertAllMethodsOverridden(GetType());
+
public override async Task KeylessEntity_simple(bool async)
{
await base.KeylessEntity_simple(async);
@@ -28,7 +31,6 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}
- [ConditionalTheory]
public override async Task KeylessEntity_where_simple(bool async)
{
await base.KeylessEntity_where_simple(async);
@@ -39,52 +41,60 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
}
- [ConditionalFact] // views are not supported
public override void KeylessEntity_by_database_view()
{
+ // Views are not supported.
+ Assert.Equal(
+ "0",
+ Assert.Throws(
+ () => base.KeylessEntity_by_database_view()).Actual);
+
+ AssertSql(
+ @"SELECT c
+FROM root c
+WHERE (c[""Discriminator""] = ""ProductView"")");
}
public override void Entity_mapped_to_view_on_right_side_of_join()
{
- }
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Entity_mapped_to_view_on_right_side_of_join();
+ return Task.CompletedTask;
+ });
- [ConditionalFact(Skip = "See issue#17246")]
- public override void Auto_initialized_view_set()
- => base.Auto_initialized_view_set();
+ AssertSql();
+ }
- [ConditionalFact(Skip = "issue #17246")] // collection support
public override void KeylessEntity_with_nav_defining_query()
{
- base.KeylessEntity_with_nav_defining_query();
+ Assert.Equal(
+ "0",
+ Assert.Throws(
+ () => base.KeylessEntity_with_nav_defining_query()).Actual);
AssertSql(
- @"");
+ @"SELECT c
+FROM root c
+WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""OrderCount""] > 0))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task KeylessEntity_with_mixed_tracking(bool async)
{
- await AssertQuery(
- async,
- ss => from c in ss.Set().Where(ct => ct.City == "London")
- from o in ss.Set().Where(ov => ov.CustomerID == c.CustomerID)
- select new { c, o },
- elementSorter: e => (e.c.CustomerID, e.o.CustomerID),
- elementAsserter: (e, a) =>
- {
- AssertEqual(e.c, a.c);
- AssertEqual(e.o, a.o);
- });
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.KeylessEntity_with_mixed_tracking(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task KeylessEntity_with_included_nav(bool async)
- => base.KeylessEntity_with_included_nav(async);
+ public override async Task KeylessEntity_with_included_nav(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.KeylessEntity_with_included_nav(async));
+
+ AssertSql();
+ }
public override async Task KeylessEntity_with_defining_query(bool async)
{
@@ -96,59 +106,62 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""ALFKI""))");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task KeylessEntity_with_defining_query_and_correlated_collection(bool async)
{
- await base.KeylessEntity_with_defining_query_and_correlated_collection(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.KeylessEntity_with_defining_query_and_correlated_collection(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "issue#17314")] // left join translation
public override async Task KeylessEntity_select_where_navigation(bool async)
{
- await base.KeylessEntity_select_where_navigation(async);
+ // Left join translation. Issue #17314.
+ await AssertTranslationFailed(() => base.KeylessEntity_select_where_navigation(async));
- AssertSql(@"");
+ AssertSql();
}
- [ConditionalTheory(Skip = "issue#17314")] // left join translation
public override async Task KeylessEntity_select_where_navigation_multi_level(bool async)
{
- await AssertQuery(
- async,
- ss => from ov in ss.Set().Where(o => o.CustomerID == "ALFKI")
- where ov.Customer.Orders.Any()
- select ov);
+ // Left join translation. Issue #17314.
+ await AssertTranslationFailed(() => base.KeylessEntity_select_where_navigation_multi_level(async));
- AssertSql(@"");
+ AssertSql();
}
- [ConditionalTheory(Skip = "issue#17314")] // left join translation
public override async Task KeylessEntity_with_included_navs_multi_level(bool async)
{
- await base.KeylessEntity_with_included_navs_multi_level(async);
+ // Left join translation. Issue #17314.
+ await AssertTranslationFailed(() => base.KeylessEntity_with_included_navs_multi_level(async));
- AssertSql(@"");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task KeylessEntity_groupby(bool async)
{
- await base.KeylessEntity_groupby(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.KeylessEntity_groupby(async));
- AssertSql(@"");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Collection_correlated_with_keyless_entity_in_predicate_works(bool async)
{
- await base.Collection_correlated_with_keyless_entity_in_predicate_works(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Collection_correlated_with_keyless_entity_in_predicate_works(async));
- AssertSql(@"");
+ AssertSql();
+ }
+
+ public override void Auto_initialized_view_set()
+ {
+ base.Auto_initialized_view_set();
+
+ AssertSql(
+ @"SELECT c
+FROM root c
+WHERE (c[""Discriminator""] = ""Customer"")");
}
private void AssertSql(params string[] expected)
diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs
index 1f4b9d5d0d2..b9d4d30407c 100644
--- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs
@@ -1,7 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.Azure.Cosmos;
+using Microsoft.EntityFrameworkCore.Cosmos.Internal;
using Microsoft.EntityFrameworkCore.TestModels.Northwind;
+using Xunit.Sdk;
#pragma warning disable RCS1202 // Avoid NullReferenceException.
@@ -19,6 +22,10 @@ public NorthwindMiscellaneousQueryCosmosTest(
//Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
}
+ [ConditionalFact]
+ public virtual void Check_all_tests_overridden()
+ => TestHelpers.AssertAllMethodsOverridden(GetType());
+
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual async Task Simple_IQueryable(bool async)
@@ -31,41 +38,50 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Shaper_command_caching_when_parameter_names_different()
{
- base.Shaper_command_caching_when_parameter_names_different();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Shaper_command_caching_when_parameter_names_different();
+ return Task.CompletedTask;
+ });
AssertSql(
- @"SELECT c
+ @"SELECT COUNT(1) AS c
FROM root c
-WHERE (((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI"")) AND true)",
+WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))",
//
- @"SELECT c
+ @"SELECT COUNT(1) AS c
FROM root c
-WHERE (((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI"")) AND true)");
+WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Lifting_when_subquery_nested_order_by_anonymous()
{
- base.Lifting_when_subquery_nested_order_by_anonymous();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Lifting_when_subquery_nested_order_by_anonymous();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Lifting_when_subquery_nested_order_by_simple()
{
- base.Lifting_when_subquery_nested_order_by_simple();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Lifting_when_subquery_nested_order_by_simple();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
public override async Task Local_dictionary(bool async)
@@ -103,26 +119,25 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = @__entity_equality_local_0_CustomerID))");
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Entity_equality_local_composite_key(bool async)
{
await base.Entity_equality_local_composite_key(async);
AssertSql(
- @"SELECT c
+ @"@__entity_equality_local_0_OrderID='10248'
+@__entity_equality_local_0_ProductID='11'
+
+SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+WHERE ((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = @__entity_equality_local_0_OrderID) AND (c[""ProductID""] = @__entity_equality_local_0_ProductID)))");
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Join_with_entity_equality_local_on_both_sources(bool async)
{
- await base.Join_with_entity_equality_local_on_both_sources(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_with_entity_equality_local_on_both_sources(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task Entity_equality_local_inline(bool async)
@@ -135,7 +150,6 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ANATR""))");
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Entity_equality_local_inline_composite_key(bool async)
{
await base.Entity_equality_local_inline_composite_key(async);
@@ -143,7 +157,7 @@ public override async Task Entity_equality_local_inline_composite_key(bool async
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+WHERE ((c[""Discriminator""] = ""OrderDetail"") AND ((c[""OrderID""] = 10248) AND (c[""ProductID""] = 11)))");
}
public override async Task Entity_equality_null(bool async)
@@ -166,437 +180,378 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] != null))");
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Query_when_evaluatable_queryable_method_call_with_repository()
{
- using (var context = CreateContext())
- {
- context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
-
- var customerRepository = new Repository(context);
- var orderRepository = new Repository(context);
-
- var results
- = customerRepository.Find().Where(c => c.CustomerID == "ALFKI")
- .Where(c => orderRepository.Find().Any(o => o.CustomerID == c.CustomerID))
- .ToList();
-
- Assert.Single(results);
-
- results
- = (from c in customerRepository.Find().Where(c => c.CustomerID == "ALFKI")
- where orderRepository.Find().Any(o => o.CustomerID == c.CustomerID)
- select c)
- .ToList();
-
- Assert.Single(results);
-
- var orderQuery = orderRepository.Find();
-
- results = customerRepository.Find().Where(c => c.CustomerID == "ALFKI")
- .Where(c => orderQuery.Any(o => o.CustomerID == c.CustomerID))
- .ToList();
-
- Assert.Single(results);
-
- context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll;
- }
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Query_when_evaluatable_queryable_method_call_with_repository();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Queryable_reprojection(bool async)
{
await base.Queryable_reprojection(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Default_if_empty_top_level(bool async)
{
- await base.Default_if_empty_top_level(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Default_if_empty_top_level(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""EmployeeID""] = 4294967295))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Join_with_default_if_empty_on_both_sources(bool async)
{
- await base.Join_with_default_if_empty_on_both_sources(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_with_default_if_empty_on_both_sources(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Default_if_empty_top_level_followed_by_projecting_constant(bool async)
{
- await base.Default_if_empty_top_level_followed_by_projecting_constant(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Default_if_empty_top_level_followed_by_projecting_constant(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Default_if_empty_top_level_positive(bool async)
{
- await base.Default_if_empty_top_level_positive(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Default_if_empty_top_level_positive(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""EmployeeID""] > 0))");
+ AssertSql();
+ }
+
+ public override async Task Default_if_empty_top_level_arg(bool async)
+ {
+ await base.Default_if_empty_top_level_arg(async);
+
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17783")]
- public override Task Default_if_empty_top_level_arg(bool async)
- => base.Default_if_empty_top_level_arg(async);
+ public override async Task Default_if_empty_top_level_arg_followed_by_projecting_constant(bool async)
+ {
+ await base.Default_if_empty_top_level_arg_followed_by_projecting_constant(async);
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Default_if_empty_top_level_arg_followed_by_projecting_constant(bool async)
- => base.Default_if_empty_top_level_arg_followed_by_projecting_constant(async);
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Default_if_empty_top_level_projection(bool async)
{
- await base.Default_if_empty_top_level_projection(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Default_if_empty_top_level_projection(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""EmployeeID""] = 4294967295))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition(bool async)
{
- await base.Where_query_composition(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition_is_null(bool async)
{
- await base.Where_query_composition_is_null(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_is_null(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition_is_not_null(bool async)
{
- await base.Where_query_composition_is_null(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_is_not_null(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition_entity_equality_one_element_SingleOrDefault(bool async)
{
- await base.Where_query_composition_entity_equality_one_element_SingleOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_one_element_SingleOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_one_element_Single(bool async)
- => base.Where_query_composition_entity_equality_one_element_Single(async);
+ public override async Task Where_query_composition_entity_equality_one_element_Single(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_one_element_Single(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Where_query_composition_entity_equality_one_element_FirstOrDefault(bool async)
{
- await base.Where_query_composition_entity_equality_one_element_FirstOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_one_element_FirstOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_one_element_First(bool async)
- => base.Where_query_composition_entity_equality_one_element_First(async);
+ public override async Task Where_query_composition_entity_equality_one_element_First(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_one_element_First(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition_entity_equality_no_elements_SingleOrDefault(bool async)
{
- await base.Where_query_composition_entity_equality_no_elements_SingleOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_no_elements_SingleOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_no_elements_Single(bool async)
- => base.Where_query_composition_entity_equality_no_elements_Single(async);
+ public override async Task Where_query_composition_entity_equality_no_elements_Single(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_no_elements_Single(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Where_query_composition_entity_equality_no_elements_FirstOrDefault(bool async)
{
- await base.Where_query_composition_entity_equality_no_elements_FirstOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_no_elements_FirstOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
+ }
+
+ public override async Task Where_query_composition_entity_equality_no_elements_First(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_no_elements_First(async));
+
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_no_elements_First(bool async)
- => base.Where_query_composition_entity_equality_no_elements_First(async);
+ public override async Task Where_query_composition_entity_equality_multiple_elements_SingleOrDefault(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_multiple_elements_SingleOrDefault(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_multiple_elements_SingleOrDefault(bool async)
- => base.Where_query_composition_entity_equality_multiple_elements_SingleOrDefault(async);
+ public override async Task Where_query_composition_entity_equality_multiple_elements_Single(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_multiple_elements_Single(async));
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_multiple_elements_Single(bool async)
- => base.Where_query_composition_entity_equality_multiple_elements_Single(async);
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue#17246")]
public override async Task Where_query_composition_entity_equality_multiple_elements_FirstOrDefault(bool async)
{
- await base.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task Where_query_composition_entity_equality_multiple_elements_First(bool async)
- => base.Where_query_composition_entity_equality_multiple_elements_First(async);
+ public override async Task Where_query_composition_entity_equality_multiple_elements_First(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition_entity_equality_multiple_elements_First(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition2(bool async)
{
- await base.Where_query_composition2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition2_FirstOrDefault(bool async)
{
- await base.Where_query_composition2_FirstOrDefault(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition2_FirstOrDefault(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_query_composition2_FirstOrDefault_with_anonymous(bool async)
{
- await base.Where_query_composition2_FirstOrDefault_with_anonymous(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_query_composition2_FirstOrDefault_with_anonymous(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalFact(Skip = "Cross collection join Issue#17246")]
public override void Select_Subquery_Single()
{
- base.Select_Subquery_Single();
+ // Cross collection join. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Select_Subquery_Single();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Select_Where_Subquery_Deep_Single()
{
- base.Select_Where_Subquery_Deep_Single();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Select_Where_Subquery_Deep_Single();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""OrderDetail"") AND (c[""OrderID""] = 10344))");
+ AssertSql();
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Select_Where_Subquery_Deep_First()
{
- base.Select_Where_Subquery_Deep_First();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Select_Where_Subquery_Deep_First();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""OrderDetail"")");
+ AssertSql();
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Select_Where_Subquery_Equality()
{
- base.Select_Where_Subquery_Equality();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Select_Where_Subquery_Equality();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_subquery_anon(bool async)
{
- await base.Where_subquery_anon(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_subquery_anon(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_subquery_anon_nested(bool async)
{
- await base.Where_subquery_anon_nested(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_subquery_anon_nested(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task OrderBy_SelectMany(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(c => c.CustomerID == "VINET")
- from o in ss.Set().OrderBy(o => o.OrderID).Take(3)
- where c.CustomerID == o.CustomerID
- select new { c.ContactName, o.OrderID },
- ss =>
- ss.Set().Where(c => c.CustomerID == "VINET")
- .SelectMany(
- _ => ss.Set().OrderBy(o => o.OrderID).Take(3),
- (c, o) => new { c, o }).Where(t => t.c.CustomerID == t.o.CustomerID)
- .Select(
- t => new { t.c.ContactName, t.o.OrderID }),
- assertOrder: true);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.OrderBy_SelectMany(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""VINET""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Let_any_subquery_anonymous(bool async)
{
- await base.Let_any_subquery_anonymous(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Let_any_subquery_anonymous(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task OrderBy_arithmetic(bool async)
{
- await base.OrderBy_arithmetic(async);
+ // Cosmos client evaluation. Issue #17246.
+ await Assert.ThrowsAsync(
+ async () => await base.OrderBy_arithmetic(async));
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+WHERE (c[""Discriminator""] = ""Employee"")
+ORDER BY (c[""EmployeeID""] - c[""EmployeeID""])");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task OrderBy_condition_comparison(bool async)
{
- await base.OrderBy_condition_comparison(async);
+ // Cosmos client evaluation. Issue #17246.
+ await Assert.ThrowsAsync(
+ async () => await base.OrderBy_condition_comparison(async));
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Product"")");
+WHERE (c[""Discriminator""] = ""Product"")
+ORDER BY (c[""UnitsInStock""] > 0), c[""ProductID""]");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task OrderBy_ternary_conditions(bool async)
{
- await base.OrderBy_ternary_conditions(async);
+ // Cosmos client evaluation. Issue #17246.
+ await Assert.ThrowsAsync(
+ async () => await base.OrderBy_ternary_conditions(async));
AssertSql(
@"SELECT c
FROM root c
-WHERE (c[""Discriminator""] = ""Product"")");
+WHERE (c[""Discriminator""] = ""Product"")
+ORDER BY ((c[""UnitsInStock""] > 10) ? (c[""ProductID""] > 40) : (c[""ProductID""] <= 40)), c[""ProductID""]");
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void OrderBy_any()
{
- base.OrderBy_any();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.OrderBy_any();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Skip(bool async)
{
- await base.Skip(async);
+ Assert.Equal(
+ CosmosStrings.OffsetRequiresLimit,
+ (await Assert.ThrowsAsync(
+ () => base.Skip_Distinct(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Skip_no_orderby(bool async)
{
- await base.Skip_no_orderby(async);
+ Assert.Equal(
+ CosmosStrings.OffsetRequiresLimit,
+ (await Assert.ThrowsAsync(
+ () => base.Skip_no_orderby(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
public override async Task Skip_Take(bool async)
@@ -614,103 +569,82 @@ ORDER BY c[""ContactName""]
OFFSET @__p_0 LIMIT @__p_1");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_Customers_Orders_Skip_Take(bool async)
{
- await base.Join_Customers_Orders_Skip_Take(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_Customers_Orders_Skip_Take(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_Customers_Orders_Skip_Take_followed_by_constant_projection(bool async)
{
- await base.Join_Customers_Orders_Skip_Take_followed_by_constant_projection(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_Customers_Orders_Skip_Take_followed_by_constant_projection(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_Customers_Orders_Projection_With_String_Concat_Skip_Take(bool async)
{
- await base.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_Customers_Orders_Orders_Skip_Take_Same_Properties(bool async)
{
- await base.Join_Customers_Orders_Orders_Skip_Take_Same_Properties(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_Customers_Orders_Orders_Skip_Take_Same_Properties(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_Skip(bool async)
{
- await base.Take_Skip(async);
+ // Subquery pushdown. Issue #16156.
+ Assert.Equal(
+ "See issue#16156",
+ (await Assert.ThrowsAsync(() => base.Take_Skip(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_Skip_Distinct(bool async)
{
- await base.Take_Skip_Distinct(async);
+ // Subquery pushdown. Issue #16156.
+ Assert.Equal(
+ "See issue#16156",
+ (await Assert.ThrowsAsync(() => base.Take_Skip_Distinct(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_Skip_Distinct_Caching(bool async)
{
- await base.Take_Skip_Distinct_Caching(async);
+ // Subquery pushdown. Issue #16156.
+ Assert.Equal(
+ "See issue#16156",
+ (await Assert.ThrowsAsync(() => base.Take_Skip_Distinct_Caching(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_Distinct_Count(bool async)
{
- await base.Take_Distinct_Count(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Take_Distinct_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_Where_Distinct_Count(bool async)
{
- await base.Take_Where_Distinct_Count(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Take_Where_Distinct_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Order"") AND (c[""CustomerID""] = ""FRANK""))");
+ AssertSql();
}
public override async Task Queryable_simple(bool async)
@@ -825,781 +759,516 @@ ORDER BY c[""CustomerID""]
OFFSET 0 LIMIT @__p_0");
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task OrderBy_Take_Count(bool async)
{
- await base.OrderBy_Take_Count(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.OrderBy_Take_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_OrderBy_Count(bool async)
{
- await base.Take_OrderBy_Count(async);
+ // Subquery pushdown. Issue #16156.
+ Assert.Equal(
+ "See issue#16156",
+ (await Assert.ThrowsAsync(() => base.Take_OrderBy_Count(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Order"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_simple(bool async)
{
- await base.Any_simple(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_simple(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_predicate(bool async)
{
- await base.Any_predicate(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_predicate(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested_negated(bool async)
{
- await base.Any_nested_negated(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested_negated(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested_negated2(bool async)
{
- await base.Any_nested_negated2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested_negated2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested_negated3(bool async)
{
- await base.Any_nested_negated3(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested_negated3(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested(bool async)
{
- await base.Any_nested(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested2(bool async)
{
- await base.Any_nested2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Any_nested3(bool async)
{
- await base.Any_nested3(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Any_nested3(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalFact(Skip = "Issue #17246")]
public override void Any_with_multiple_conditions_still_uses_exists()
{
- base.Any_with_multiple_conditions_still_uses_exists();
+ // Cosmos client evaluation. Issue #17246.
+ AssertTranslationFailed(
+ () =>
+ {
+ base.Any_with_multiple_conditions_still_uses_exists();
+ return Task.CompletedTask;
+ });
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task All_top_level(bool async)
{
- await base.All_top_level(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.All_top_level(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task All_top_level_column(bool async)
{
- await base.All_top_level_column(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.All_top_level_column(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task All_top_level_subquery(bool async)
{
- await AssertSingleResult(
- async,
- syncQuery: ss => ss.Set()
- .All(
- c1 => c1.CustomerID == "ALFKI"
- && ss.Set().Any(c2 => ss.Set().Any(c3 => c1.CustomerID == c3.CustomerID))),
- asyncQuery: ss => ss.Set()
- .AllAsync(
- c1 => c1.CustomerID == "ALFKI"
- && ss.Set().Any(c2 => ss.Set().Any(c3 => c1.CustomerID == c3.CustomerID)),
- default));
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.All_top_level_subquery(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task All_top_level_subquery_ef_property(bool async)
{
- await AssertSingleResult(
- async,
- syncQuery: ss => ss.Set()
- .All(
- c1 => c1.CustomerID == "ALFKI"
- && ss.Set()
- .Any(
- c2 => ss.Set()
- .Any(c3 => EF.Property(c1, "CustomerID") == c3.CustomerID))),
- asyncQuery: ss => ss.Set()
- .AllAsync(
- c1 => c1.CustomerID == "ALFKI"
- && ss.Set()
- .Any(
- c2 => ss.Set()
- .Any(c3 => EF.Property(c1, "CustomerID") == c3.CustomerID)),
- default));
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.All_top_level_subquery_ef_property(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task First_client_predicate(bool async)
{
await base.First_client_predicate(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many_or(bool async)
{
- await base.Where_select_many_or(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many_or(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many_or2(bool async)
{
- await base.Where_select_many_or2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many_or2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many_or3(bool async)
{
- await base.Where_select_many_or3(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many_or3(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many_or4(bool async)
{
- await base.Where_select_many_or4(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many_or4(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many_or_with_parameter(bool async)
{
- await base.Where_select_many_or_with_parameter(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many_or_with_parameter(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_mixed(bool async)
{
await base.SelectMany_mixed(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_simple_subquery(bool async)
{
- await base.SelectMany_simple_subquery(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_simple_subquery(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_simple1(bool async)
{
- await base.SelectMany_simple1(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_simple1(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_simple2(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from e1 in ss.Set().Where(ct => ct.City == "London")
- from c in ss.Set().Where(ct => ct.City == "London")
- from e2 in ss.Set().Where(ct => ct.City == "London")
- select new
- {
- e1,
- c,
- e2.FirstName
- },
- e => (e.e1.EmployeeID, e.c.CustomerID, e.FirstName),
- entryCount: 10);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_simple2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""City""] = ""London""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_entity_deep(bool async)
{
- await AssertQuery(
- async,
- ss => from e1 in ss.Set().Where(e => e.EmployeeID == 1)
- from e2 in ss.Set()
- from e3 in ss.Set()
- from e4 in ss.Set()
- select new
- {
- e2,
- e3,
- e1,
- e4
- },
- e => (e.e2.EmployeeID, e.e3.EmployeeID, e.e1.EmployeeID, e.e4.EmployeeID),
- entryCount: 9);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_entity_deep(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""EmployeeID""] = 1))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_projection1(bool async)
{
- await base.SelectMany_projection1(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_projection1(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_projection2(bool async)
{
- await base.SelectMany_projection2(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_projection2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Employee"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_customer_orders(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(ct => ct.City == "London")
- from o in ss.Set()
- where c.CustomerID == o.CustomerID
- select new { c.ContactName, o.OrderID },
- e => (e.ContactName, e.OrderID));
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_customer_orders(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_Count(bool async)
{
- await AssertCount(
- async,
- ss => from c in ss.Set().Where(ct => ct.City == "London")
- from o in ss.Set()
- select c.CustomerID);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_LongCount(bool async)
{
- await AssertLongCount(
- async,
- ss => from c in ss.Set().Where(ct => ct.City == "London")
- from o in ss.Set()
- select c.CustomerID);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_LongCount(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_OrderBy_ThenBy_Any(bool async)
{
- await base.SelectMany_OrderBy_ThenBy_Any(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_OrderBy_ThenBy_Any(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_Where_Count(bool async)
{
- await base.Join_Where_Count(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_Where_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_Join_Any(bool async)
{
- await base.Where_Join_Any(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_Join_Any(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_Join_Exists(bool async)
{
await base.Where_Join_Exists(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_Join_Exists_Inequality(bool async)
{
await base.Where_Join_Exists_Inequality(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_Join_Exists_Constant(bool async)
{
await base.Where_Join_Exists_Constant(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_Join_Not_Exists(bool async)
{
await base.Where_Join_Not_Exists(async);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Join_OrderBy_Count(bool async)
{
- await base.Join_OrderBy_Count(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Join_OrderBy_Count(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Multiple_joins_Where_Order_Any(bool async)
{
- await base.Multiple_joins_Where_Order_Any(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Multiple_joins_Where_Order_Any(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_join_select(bool async)
{
- await base.Where_join_select(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_join_select(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_orderby_join_select(bool async)
{
- await base.Where_orderby_join_select(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_orderby_join_select(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] != ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_join_orderby_join_select(bool async)
{
- await base.Where_join_orderby_join_select(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_join_orderby_join_select(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] != ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_select_many(bool async)
{
- await base.Where_select_many(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_select_many(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Where_orderby_select_many(bool async)
{
- await base.Where_orderby_select_many(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.Where_orderby_select_many(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_cartesian_product_with_ordering(bool async)
{
- await base.SelectMany_cartesian_product_with_ordering(async);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_cartesian_product_with_ordering(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_Joined_DefaultIfEmpty(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(cst => cst.CustomerID == "ALFKI")
- from o in ss.Set().Where(o => o.CustomerID == c.CustomerID).DefaultIfEmpty()
- select new { c.ContactName, o },
- e => (e.ContactName, +e.o?.OrderID),
- entryCount: 6);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Joined_DefaultIfEmpty(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_Joined_DefaultIfEmpty2(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(cst => cst.CustomerID == "ALFKI")
- from o in ss.Set().Where(o => o.CustomerID == c.CustomerID).DefaultIfEmpty()
- select o,
- entryCount: 6);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Joined_DefaultIfEmpty2(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
- public override Task SelectMany_Joined_DefaultIfEmpty3(bool async)
- => base.SelectMany_Joined_DefaultIfEmpty3(async);
+ public override async Task SelectMany_Joined_DefaultIfEmpty3(bool async)
+ {
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Joined_DefaultIfEmpty3(async));
+
+ AssertSql();
+ }
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_Joined(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(cst => cst.CustomerID == "ALFKI")
- from o in ss.Set().Where(o => o.CustomerID == c.CustomerID)
- select new { c.ContactName, o.OrderDate },
- e => (e.ContactName, e.OrderDate));
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Joined(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task SelectMany_Joined_Take(bool async)
{
- await AssertQuery(
- async,
- ss =>
- from c in ss.Set().Where(cst => cst.CustomerID == "ALFKI")
- from o in ss.Set().Where(o => o.CustomerID == c.CustomerID).Take(1000)
- select new { c.ContactName, o },
- e => (e.ContactName, e.o.OrderID),
- entryCount: 6);
+ // Cosmos client evaluation. Issue #17246.
+ await AssertTranslationFailed(() => base.SelectMany_Joined_Take(async));
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] = ""ALFKI""))");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_with_single(bool async)
{
- await base.Take_with_single(async);
+ // Subquery pushdown. Issue #16156.
+ Assert.Equal(
+ "See issue#16156",
+ (await Assert.ThrowsAsync(() => base.Take_with_single(async))).Message);
- AssertSql(
- @"SELECT c
-FROM root c
-WHERE (c[""Discriminator""] = ""Customer"")");
+ AssertSql();
}
- [ConditionalTheory(Skip = "Issue #17246")]
public override async Task Take_with_single_select_many(bool async)
{
- await AssertSingle(
- async,
- ss => (from c in ss.Set().Where(cu => cu.CustomerID == "ALFKI")
- from o in ss.Set().Where(or => or.OrderID < 10300)
- orderby c.CustomerID, o.OrderID
- select new { c, o })
- .Take(1)
- .Cast