Fixed functional test

This commit is contained in:
Koen Bekkenutte
2021-12-12 20:07:32 +08:00
parent e9405b5933
commit d24ab7fc82
2 changed files with 3 additions and 5 deletions
@@ -0,0 +1,2 @@
SELECT CAST([c].[Age] AS float) / [c].[AverageLifespan] AS [LifeProgression], CAST([c].[MentalAge] AS float) / [c].[AverageLifespan] AS [MentalLifeProgression]
FROM [Cat] AS [c]
@@ -31,10 +31,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests
[Projectable]
public double MentalLifeProgression
=> MentalAge / AverageLifespan;
[Projectable]
public double ReservedAge
=> base.Age; // base should not affect the generated outcome
}
@@ -44,7 +40,7 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests
using var dbContext = new SampleDbContext<Cat>();
var query = dbContext.Set<Cat>()
.Select(x => new { x.LifeProgression, x.AverageLifespan });
.Select(x => new { x.LifeProgression, x.MentalLifeProgression });
return Verifier.Verify(query.ToQueryString());
}