Add LINQ Expression JSON serialization & SignalR grid source
- Introduce AcExpressionHelper and related classes for serializing/deserializing LINQ Expression trees and IQueryable queries to/from JSON, enabling remote transport and execution. - Add MgGridSignalRDataSource<TDataItem, TId> for instant local filtering and background refresh in DevExpress grids using SignalR. - Update bunit NuGet package to v2.4.2 in test projects. - Minor: update FruitBank base URL comment, add new test in OrderClientTests.
This commit is contained in:
parent
609ced26f3
commit
10eea9e70c
|
|
@ -9,7 +9,7 @@ public static class FruitBankConstClient
|
|||
|
||||
public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
|
||||
//public static string BaseUrl = "https://localhost:44372"; //FrutiBank nop
|
||||
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||
//public static string BaseUrl = "https://fruitbank.mangoweb.hu/"; //FrutiBank nop
|
||||
#if RELEASE
|
||||
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="bunit" Version="2.2.2" />
|
||||
<PackageReference Include="bunit" Version="2.4.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@ using AyCode.Core.Extensions;
|
|||
using AyCode.Core.Loggers;
|
||||
using FruitBank.Common;
|
||||
using FruitBank.Common.Dtos;
|
||||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Loggers;
|
||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||
using Newtonsoft.Json;
|
||||
using Nop.Core.Domain.Common;
|
||||
using Nop.Core.Domain.Orders;
|
||||
using Nop.Core.Domain.Payments;
|
||||
using System.Linq.Expressions;
|
||||
using System.Runtime.Serialization;
|
||||
using FruitBank.Common.Entities;
|
||||
using Nop.Core.Domain.Common;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Tests;
|
||||
|
||||
|
|
@ -77,6 +78,18 @@ public sealed class OrderClientTests
|
|||
Assert.IsTrue(orderDtos.All(o => o.OrderItemDtos.All(oi => oi.ProductDto != null && oi.ProductDto.Id == oi.ProductId)));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAllOrderDtosByFilter()
|
||||
{
|
||||
//Queryable? filter = dto => dto.Id == 15;
|
||||
var orderDtos = await _signalRClient.GetAllOrderDtos();
|
||||
|
||||
Assert.IsNotNull(orderDtos);
|
||||
Assert.IsTrue(orderDtos.Count != 0);
|
||||
|
||||
Assert.IsTrue(orderDtos.All(o => o.OrderItemDtos.All(oi => oi.ProductDto != null && oi.ProductDto.Id == oi.ProductId)));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DataRow(1)]
|
||||
[DataRow(2)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue