DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/Services/DepositCrudCacheServiceTest.cs
2023-11-03 17:02:44 +05:00

29 lines
885 B
C#

using AsbCloudApp.Data;
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using AsbCloudInfrastructure.Repository;
namespace AsbCloudWebApi.Tests.ServicesTests
{
public class DepositCrudCacheServiceTest : CrudServiceTestAbstract<DepositDto>
{
protected override DepositDto MakeNewItem()
{
var item = new DepositDto
{
Caption = "test deposit",
Latitude = 1,
Longitude = 2,
Timezone = new SimpleTimezoneDto { Hours = 5, TimezoneId = "test Never-land" }
};
return item;
}
protected override ICrudRepository<DepositDto> MakeService()
{
var dbContext = TestHelpter.MakeRealTestContext();
return new CrudCacheRepositoryBase<DepositDto, Deposit>(dbContext, TestHelpter.MemoryCache);
}
}
}