updating references.
This commit is contained in:
parent
74e16d8560
commit
41f456e30d
@ -6,7 +6,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -52,62 +52,6 @@ namespace PoweredSoft.DynamicQuery.Test
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void A()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
MockContextFactory.SeedAndTestContextFor("GroupTests_A", TestSeeders.SeedTicketScenario, ctx =>
|
|
||||||
{
|
|
||||||
var a = ctx.Tickets
|
|
||||||
.OrderBy(t => t.Owner)
|
|
||||||
.ThenBy(t => t.Priority)
|
|
||||||
.Skip(0)
|
|
||||||
.Take(100)
|
|
||||||
.GroupBy(t => new
|
|
||||||
{
|
|
||||||
t.Owner,
|
|
||||||
t.Priority
|
|
||||||
})
|
|
||||||
.Select(t => new
|
|
||||||
{
|
|
||||||
t.Key.Owner,
|
|
||||||
t.Key.Priority,
|
|
||||||
Records = t.ToList()
|
|
||||||
})
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
int breakHere = 0;
|
|
||||||
});*/
|
|
||||||
|
|
||||||
MockContextFactory.SeedAndTestContextFor("GroupTests_A2", TestSeeders.SeedTicketScenario, ctx =>
|
|
||||||
{
|
|
||||||
var criteria = new QueryCriteria()
|
|
||||||
{
|
|
||||||
Groups = new List<IGroup>()
|
|
||||||
{
|
|
||||||
new Group { Path = "Owner" },
|
|
||||||
new Group { Path = "Priority" }
|
|
||||||
},
|
|
||||||
Page = 1,
|
|
||||||
PageSize = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
var queryHandler = new QueryHandler();
|
|
||||||
var result = queryHandler.Execute(ctx.Tickets, criteria);
|
|
||||||
|
|
||||||
var groupedResult = result.GroupedResult();
|
|
||||||
|
|
||||||
var firstGroup = groupedResult.Groups.FirstOrDefault();
|
|
||||||
Assert.NotNull(firstGroup);
|
|
||||||
var secondGroup = groupedResult.Groups.Skip(1).FirstOrDefault();
|
|
||||||
Assert.NotNull(secondGroup);
|
|
||||||
|
|
||||||
var expected = ctx.Tickets.Select(t => t.TicketType).Distinct().Count();
|
|
||||||
var c = groupedResult.Groups.Select(t => t.GroupValue).Count();
|
|
||||||
Assert.Equal(expected, c);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void GroupComplex()
|
public void GroupComplex()
|
||||||
{
|
{
|
||||||
|
@ -7,13 +7,16 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bogus" Version="24.3.1" />
|
<PackageReference Include="Bogus" Version="28.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.1.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
||||||
<PackageReference Include="PoweredSoft.Data.EntityFrameworkCore" Version="1.1.3" />
|
<PackageReference Include="PoweredSoft.Data.EntityFrameworkCore" Version="1.1.3" />
|
||||||
<PackageReference Include="xunit" Version="2.3.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
|
||||||
<PackageReference Include="PoweredSoft.Data" Version="1.1.3" />
|
<PackageReference Include="PoweredSoft.Data" Version="1.1.3" />
|
||||||
<PackageReference Include="PoweredSoft.DynamicLinq" Version="1.1.7" />
|
<PackageReference Include="PoweredSoft.DynamicLinq" Version="1.1.8" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user