Example #1
0
        public void BrowsePayments_UsesQuery_ReturnsResultOfDispatch()
        {
            var result = new Mock <IPagedResult <Dto.PaymentDto> >(MockBehavior.Strict).Object;
            var query  = new BrowsePayments();

            _dispatcherMock.Setup(d => d.QueryAsync(query)).ReturnsAsync(result).Verifiable();

            var returnedResult = _controller.BrowsePayments(query).GetAwaiter().GetResult();

            Assert.AreEqual(result, returnedResult);
            _dispatcherMock.Verify();
        }