41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
|
using DD.Persistence.Client.Clients.Interfaces;
|
|||
|
using DD.Persistence.Client.Clients.Mapping.Abstractions;
|
|||
|
using DD.Persistence.Client.Clients.Mapping.Clients;
|
|||
|
using DD.Persistence.Repositories;
|
|||
|
using DD.Persistence.Services.Interfaces;
|
|||
|
using NSubstitute;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace DD.Persistence.Test;
|
|||
|
public class MappingClientsTest
|
|||
|
{
|
|||
|
private readonly ITimestampedValuesClient timestampedValuesClient = Substitute.For<ITimestampedValuesClient>();
|
|||
|
private readonly TimestampedMappingClient timestampedMappingClient;
|
|||
|
public record TestDto
|
|||
|
{
|
|||
|
public int Id { get; set; }
|
|||
|
public string? Value { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
private readonly Dictionary<Guid, Type> mappingConfigs = new Dictionary<Guid, Type>()
|
|||
|
{
|
|||
|
{ Guid.NewGuid(), typeof(TestDto) }
|
|||
|
};
|
|||
|
|
|||
|
public MappingClientsTest()
|
|||
|
{
|
|||
|
timestampedMappingClient = new TimestampedMappingClient(timestampedValuesClient, mappingConfigs);
|
|||
|
}
|
|||
|
|
|||
|
[Fact]
|
|||
|
public async void Test()
|
|||
|
{
|
|||
|
var discriminatorIds = mappingConfigs.Keys;
|
|||
|
var result = await timestampedMappingClient.Gett(discriminatorIds, null, null, null, 0, 1, CancellationToken.None);
|
|||
|
}
|
|||
|
}
|