Еще один итог
This commit is contained in:
parent
16afbd1ce1
commit
2041f50390
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.Enums;
|
||||
using PuferFishContracts.Exceptions;
|
||||
using PuferFishContracts.Extensions;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
@ -17,8 +18,8 @@ internal class PointsBusinessLogicContract(IPointsStorageContract pointsStorageC
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IPointsStorageContract _pointsStorageContract = pointsStorageContract;
|
||||
private readonly ISaleStorageContract _saleStorageContract = saleStorageContract;
|
||||
//private readonly IPostStorageContract _postStorageContract = postStorageContract;
|
||||
private readonly IBuyerStorageContract _buyerStorageContract = buyerStorageContract;
|
||||
|
||||
public List<PointsDataModel> GetAllPointsByPeriod(DateTime fromDate, DateTime toDate)
|
||||
{
|
||||
_logger.LogInformation("GetAllSalaries params: {fromDate}, {toDate}",
|
||||
|
@ -18,6 +18,7 @@ internal class ProductBusinessLogicContract(IProductStorageContract productStora
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IProductStorageContract _productStorageContract = productStorageContract;
|
||||
|
||||
public List<ProductDataModel> GetAllProducts(bool onlyActive)
|
||||
{
|
||||
_logger.LogInformation("GetAllProducts params: {onlyActive}", onlyActive);
|
||||
@ -83,4 +84,4 @@ internal class ProductBusinessLogicContract(IProductStorageContract productStora
|
||||
}
|
||||
_productStorageContract.DelElement(id);
|
||||
}
|
||||
}
|
||||
}
|
@ -122,4 +122,4 @@ JsonSerializer.Serialize(saleDataModel));
|
||||
}
|
||||
_saleStorageContract.DelElement(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ internal class WorkerBusinessLogicContract(IWorkerStorageContract workerStorageC
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IWorkerStorageContract _workerStorageContract =
|
||||
workerStorageContract;
|
||||
|
||||
public List<WorkerDataModel> GetAllWorkers(bool onlyActive = true)
|
||||
{
|
||||
_logger.LogInformation("GetAllWorkers params: {onlyActive}",
|
||||
@ -107,3 +108,4 @@ new NullListException();
|
||||
_workerStorageContract.DelElement(id);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Moq;
|
||||
using PuferFishBusinessLogic.Implementations;
|
||||
using PuferFishContracts.DataModels;
|
||||
@ -201,9 +196,8 @@ internal class PointsBusinessLogicContractTests
|
||||
{
|
||||
// Arrange
|
||||
var buyerId = Guid.NewGuid().ToString();
|
||||
var expectedPoints = 100.0; // Ожидаемое количество баллов
|
||||
var expectedPoints = 100.0;
|
||||
|
||||
// Установим значение Points для покупателя равным expectedPoints
|
||||
_buyerStorageContract.Setup(x => x.GetList())
|
||||
.Returns(new List<BuyerDataModel> { new BuyerDataModel(buyerId, "Test", "123456789", expectedPoints) });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user