|
|
@ -13,6 +13,7 @@ namespace UnitTest.Ordering.Application |
|
|
|
using global::Ordering.API.Application.IntegrationEvents; |
|
|
|
using global::Ordering.API.Application.Models; |
|
|
|
using MediatR; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Xunit; |
|
|
@ -50,8 +51,9 @@ namespace UnitTest.Ordering.Application |
|
|
|
|
|
|
|
_identityServiceMock.Setup(svc => svc.GetUserIdentity()).Returns(buyerId); |
|
|
|
|
|
|
|
var LoggerMock = new Mock<ILogger<CreateOrderCommandHandler>>(); |
|
|
|
//Act
|
|
|
|
var handler = new CreateOrderCommandHandler(_mediator.Object, _orderingIntegrationEventService.Object, _orderRepositoryMock.Object, _identityServiceMock.Object); |
|
|
|
var handler = new CreateOrderCommandHandler(_mediator.Object, _orderingIntegrationEventService.Object, _orderRepositoryMock.Object, _identityServiceMock.Object, LoggerMock.Object); |
|
|
|
var cltToken = new System.Threading.CancellationToken(); |
|
|
|
var result = await handler.Handle(fakeOrderCmd, cltToken); |
|
|
|
|
|
|
|