Skip to content

Commit 5bae552

Browse files
committed
Test fix (wrong assert).
1 parent 83b50e1 commit 5bae552

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Provider/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AsyncGearsOfWarQueryFbTest.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
//$Authors = Jiri Cincura ([email protected])
1717

18+
using System.Linq;
19+
using System.Threading.Tasks;
20+
using Microsoft.EntityFrameworkCore;
1821
using Microsoft.EntityFrameworkCore.Query;
22+
using Xunit;
1923
using Xunit.Abstractions;
2024

2125
namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query
@@ -25,5 +29,13 @@ public class AsyncGearsOfWarQueryFbTest : AsyncGearsOfWarQueryTestBase<GearsOfWa
2529
public AsyncGearsOfWarQueryFbTest(GearsOfWarQueryFbFixture fixture, ITestOutputHelper testOutputHelper)
2630
: base(fixture)
2731
{ }
32+
33+
// the original implementation has wrong assert
34+
public override async Task GroupBy_Select_sum()
35+
{
36+
using var ctx = CreateContext();
37+
var result = await ctx.Missions.GroupBy(m => m.CodeName).Select(g => g.Sum(m => m.Rating)).ToListAsync();
38+
Assert.Equal(6.3, result.Sum() ?? double.NaN, precision: 1);
39+
}
2840
}
2941
}

0 commit comments

Comments
 (0)