Пример #1
0
        public async Task GetPaymentDetailsCallsThroughToMediator()
        {
            Guid paymentId = Guid.NewGuid();
            var  mediator  = new Mock <IMediator>();
            var  sut       = new PaymentsController(mediator.Object);

            await sut.GetPaymentDetails(paymentId);

            mediator.Verify(x => x.Send(It.Is <GetPaymentRequest>(y => y.PaymentId == paymentId), It.IsAny <CancellationToken>()), Times.Once);
        }