2022-06-09 17:25:26 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using AsbCloudApp.Services;
|
|
|
|
|
using AsbCloudDb.Model;
|
|
|
|
|
using AsbCloudInfrastructure.Services;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudWebApi.Tests.ServicesTests
|
|
|
|
|
{
|
|
|
|
|
public class DepositCrudCacheServiceTest : CrudServiceTestAbstract<DepositDto>
|
|
|
|
|
{
|
|
|
|
|
protected override DepositDto MakeNewItem()
|
|
|
|
|
{
|
|
|
|
|
var item = new DepositDto
|
|
|
|
|
{
|
|
|
|
|
Caption = "test deposit",
|
|
|
|
|
Latitude = 1,
|
|
|
|
|
Longitude = 2,
|
2022-06-15 14:57:37 +05:00
|
|
|
|
Timezone = new SimpleTimezoneDto { Hours = 5, TimezoneId = "test Never-land" }
|
2022-06-09 17:25:26 +05:00
|
|
|
|
};
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override ICrudService<DepositDto> MakeService()
|
|
|
|
|
{
|
|
|
|
|
var dbContext = TestHelpter.MakeTestContext();
|
|
|
|
|
return new CrudCacheServiceBase<DepositDto, Deposit>(dbContext);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|