Skip to content

Commit

Permalink
Query: Enable skipped test for #20453 (#20802)
Browse files Browse the repository at this point in the history
It passes with latest emulator

Resolves #20453
  • Loading branch information
smitpatel authored May 1, 2020
1 parent 3656e9d commit 1b21894
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ public override void Can_read_back_bool_mapped_as_int_through_navigation()
base.Can_read_back_bool_mapped_as_int_through_navigation();
}

[ConditionalFact(Skip = "Issue #20543")]
public override void Object_to_string_conversion()
{
base.Object_to_string_conversion();

AssertSql(@" ");
AssertSql(
@"SELECT c[""TestSignedByte""], c[""TestByte""], c[""TestInt16""], c[""TestUnsignedInt16""], c[""TestInt32""], c[""TestUnsignedInt32""], c[""TestInt64""], c[""TestUnsignedInt64""], c[""TestSingle""], c[""TestDouble""], c[""TestDecimal""], c[""TestCharacter""], c[""TestDateTime""], c[""TestDateTimeOffset""], c[""TestTimeSpan""]
FROM root c
WHERE ((c[""Discriminator""] = ""BuiltInDataTypes"") AND (c[""Id""] = 13))");
}

private void AssertSql(params string[] expected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ FROM root c
WHERE (c[""Discriminator""] IN (""Blog"", ""RssBlog"") AND NOT((c[""IndexerVisible""] = ""Aye"")))");
}

[ConditionalFact(Skip = "Issue #20543")]
public override void Object_to_string_conversion()
{
base.Object_to_string_conversion();

AssertSql(@" ");
}

private void AssertSql(params string[] expected)
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);

Expand Down
2 changes: 2 additions & 0 deletions test/EFCore.Specification.Tests/BuiltInDataTypesTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,8 @@ public virtual void Object_to_string_conversion()
})
.First();

Fixture.ListLoggerFactory.Clear();

var query = context.Set<BuiltInDataTypes>()
.Where(e => e.Id == 13)
.Select(b => new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2920,10 +2920,6 @@ public override void Object_to_string_conversion()
base.Object_to_string_conversion();

AssertSql(
@"SELECT [b].[Id], [b].[Enum16], [b].[Enum32], [b].[Enum64], [b].[Enum8], [b].[EnumS8], [b].[EnumU16], [b].[EnumU32], [b].[EnumU64], [b].[PartitionId], [b].[TestBoolean], [b].[TestByte], [b].[TestCharacter], [b].[TestDateTime], [b].[TestDateTimeOffset], [b].[TestDecimal], [b].[TestDouble], [b].[TestInt16], [b].[TestInt32], [b].[TestInt64], [b].[TestSignedByte], [b].[TestSingle], [b].[TestTimeSpan], [b].[TestUnsignedInt16], [b].[TestUnsignedInt32], [b].[TestUnsignedInt64]
FROM [BuiltInDataTypes] AS [b]
WHERE [b].[Id] = 13",
//
@"SELECT CONVERT(VARCHAR(4), [b].[TestSignedByte]) AS [Sbyte], CONVERT(VARCHAR(3), [b].[TestByte]) AS [Byte], CONVERT(VARCHAR(6), [b].[TestInt16]) AS [Short], CONVERT(VARCHAR(5), [b].[TestUnsignedInt16]) AS [Ushort], CONVERT(VARCHAR(11), [b].[TestInt32]) AS [Int], CONVERT(VARCHAR(10), [b].[TestUnsignedInt32]) AS [Uint], CONVERT(VARCHAR(20), [b].[TestInt64]) AS [Long], CONVERT(VARCHAR(20), [b].[TestUnsignedInt64]) AS [Ulong], CONVERT(VARCHAR(100), [b].[TestSingle]) AS [Float], CONVERT(VARCHAR(100), [b].[TestDouble]) AS [Double], CONVERT(VARCHAR(100), [b].[TestDecimal]) AS [Decimal], CONVERT(VARCHAR(1), [b].[TestCharacter]) AS [Char], CONVERT(VARCHAR(100), [b].[TestDateTime]) AS [DateTime], CONVERT(VARCHAR(100), [b].[TestDateTimeOffset]) AS [DateTimeOffset], CONVERT(VARCHAR(100), [b].[TestTimeSpan]) AS [TimeSpan]
FROM [BuiltInDataTypes] AS [b]
WHERE [b].[Id] = 13");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1501,10 +1501,6 @@ public override void Object_to_string_conversion()
base.Object_to_string_conversion();

AssertSql(
@"SELECT ""b"".""Id"", ""b"".""Enum16"", ""b"".""Enum32"", ""b"".""Enum64"", ""b"".""Enum8"", ""b"".""EnumS8"", ""b"".""EnumU16"", ""b"".""EnumU32"", ""b"".""EnumU64"", ""b"".""PartitionId"", ""b"".""TestBoolean"", ""b"".""TestByte"", ""b"".""TestCharacter"", ""b"".""TestDateTime"", ""b"".""TestDateTimeOffset"", ""b"".""TestDecimal"", ""b"".""TestDouble"", ""b"".""TestInt16"", ""b"".""TestInt32"", ""b"".""TestInt64"", ""b"".""TestSignedByte"", ""b"".""TestSingle"", ""b"".""TestTimeSpan"", ""b"".""TestUnsignedInt16"", ""b"".""TestUnsignedInt32"", ""b"".""TestUnsignedInt64""
FROM ""BuiltInDataTypes"" AS ""b""
WHERE ""b"".""Id"" = 13",
//
@"SELECT ""b"".""TestSignedByte"", ""b"".""TestByte"", ""b"".""TestInt16"", ""b"".""TestUnsignedInt16"", ""b"".""TestInt32"", ""b"".""TestUnsignedInt32"", ""b"".""TestInt64"", ""b"".""TestUnsignedInt64"", ""b"".""TestSingle"", ""b"".""TestDouble"", ""b"".""TestDecimal"", ""b"".""TestCharacter"", ""b"".""TestDateTime"", ""b"".""TestDateTimeOffset"", ""b"".""TestTimeSpan""
FROM ""BuiltInDataTypes"" AS ""b""
WHERE ""b"".""Id"" = 13");
Expand Down

0 comments on commit 1b21894

Please sign in to comment.