Some tests need the GUID to be formatted with braces so that it matches what is returned from Jet (#219)

pull/223/head
Christopher Jolly 2 years ago committed by GitHub
parent 0a79a231f5
commit b0b8dffcca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10936,6 +10936,8 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_bo
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_boolean_property_non_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_guid_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_guid_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_string_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.ToString_string_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Trying_to_access_unmapped_property_in_projection(async: False)
@ -17756,6 +17758,8 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_boolean_property_non_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_guid_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_guid_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_string_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.ToString_string_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Trying_to_access_unmapped_property_in_projection(async: False)
@ -19525,6 +19529,8 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_boolean_property_non_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_boolean_property_nullable(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_guid_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_guid_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_string_property_projection(async: False)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.ToString_string_property_projection(async: True)
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Trying_to_access_unmapped_property_in_projection(async: False)

@ -8,6 +8,7 @@ using Xunit.Abstractions;
using EntityFrameworkCore.Jet.FunctionalTests.TestUtilities;
using Microsoft.EntityFrameworkCore.TestModels.GearsOfWarModel;
using System.Linq;
using Xunit;
namespace EntityFrameworkCore.Jet.FunctionalTests.Query
{
@ -9034,11 +9035,20 @@ WHERE `m`.`Rating` IS NULL
public override async Task ToString_guid_property_projection(bool async)
{
await base.ToString_guid_property_projection(async);
await AssertQuery(
async,
ss => ss.Set<CogTag>().Select(
ct => new { A = ct.GearNickName, B = ct.Id.ToString("B") }),
elementSorter: e => e.B,
elementAsserter: (e, a) =>
{
Assert.Equal(e.A, a.A);
Assert.Equal(e.B.ToLower(), a.B.ToLower());
});
AssertSql(
"""
SELECT `t`.`GearNickName` AS `A`, CONVERT(varchar(36), `t`.`Id`) AS `B`
"""
SELECT `t`.`GearNickName`, `t`.`Id`
FROM `Tags` AS `t`
""");
}

@ -12128,12 +12128,21 @@ WHERE `m`.`CodeName` = 'Operation Foobar'
public override async Task ToString_guid_property_projection(bool async)
{
await base.ToString_guid_property_projection(async);
await AssertQuery(
async,
ss => ss.Set<CogTag>().Select(
ct => new { A = ct.GearNickName, B = ct.Id.ToString("B") }),
elementSorter: e => e.B,
elementAsserter: (e, a) =>
{
Assert.Equal(e.A, a.A);
Assert.Equal(e.B.ToLower(), a.B.ToLower());
});
AssertSql(
"""
SELECT [t].[GearNickName] AS [A], CONVERT(varchar(36), [t].[Id]) AS [B]
FROM [Tags] AS [t]
"""
SELECT `t`.`GearNickName`, `t`.`Id`
FROM `Tags` AS `t`
""");
}

@ -9833,14 +9833,21 @@ WHERE `m`.`CodeName` = 'Operation Foobar'
public override async Task ToString_guid_property_projection(bool async)
{
await base.ToString_guid_property_projection(async);
await AssertQuery(
async,
ss => ss.Set<CogTag>().Select(
ct => new { A = ct.GearNickName, B = ct.Id.ToString("B") }),
elementSorter: e => e.B,
elementAsserter: (e, a) =>
{
Assert.Equal(e.A, a.A);
Assert.Equal(e.B.ToLower(), a.B.ToLower());
});
AssertSql(
"""
SELECT `f`.`Id`, `f`.`CapitalName`, `f`.`Name`, `f`.`ServerAddress`, `l`.`CommanderName`, `l`.`Eradicated`, IIF(`l`.`Id` IS NOT NULL, 'LocustHorde', NULL) AS `Discriminator`, `c`.`Name`, `c`.`Location`, `c`.`Nation`
FROM (`Factions` AS `f`
LEFT JOIN `LocustHordes` AS `l` ON `f`.`Id` = `l`.`Id`)
LEFT JOIN `Cities` AS `c` ON `f`.`CapitalName` = `c`.`Name`
"""
SELECT `t`.`GearNickName`, `t`.`Id`
FROM `Tags` AS `t`
""");
}

Loading…
Cancel
Save