public void Arrange() { _transferRequest = new TransferRequest(); MockMediator.Setup(x => x.SendAsync(It.IsAny <GetTransferRequestQueryRequest>())) .ReturnsAsync(new GetTransferRequestQueryResponse { TransferRequest = _transferRequest }); _transferRequestViewModel = new TransferRequestViewModel(); MockCommitmentMapper.Setup(x => x.MapToTransferRequestViewModel(It.IsAny <TransferRequest>())) .Returns(_transferRequestViewModel); MockHashingService.Setup(x => x.DecodeValue("ABC123")).Returns(123); MockHashingService.Setup(x => x.DecodeValue("XYZ789")).Returns(789); }
public void Arrange() { _mockFeatureToggle = new Mock <IFeatureToggle>(); MockFeatureToggleService.Setup(x => x.Get <Transfers>()).Returns(_mockFeatureToggle.Object); _sendAsyncResponse = new GetAccountTransferConnectionsResponse { TransferConnections = new List <TransferConnection> { new TransferConnection() } }; MockCommitmentMapper.Setup(x => x.MapToTransferConnectionsViewModel(It.IsAny <List <TransferConnection> >())) .Returns(new List <TransferConnectionViewModel> { new TransferConnectionViewModel() }); MockMediator.Setup(x => x.SendAsync(It.IsAny <GetAccountTransferConnectionsRequest>())).ReturnsAsync(_sendAsyncResponse); }