Exemplo n.º 1
0
        public async Task Ensure_Create_Wallet_Success_Result()
        {
            //Arrange
            var createWallet = new CreateWalletRequestModel();

            Mediator.Setup(x => x.Send(It.IsAny <CreateWalletRequestModel>(), new CancellationToken())).
            ReturnsAsync(new CreateWalletResponseModel {
                Label = "New Wallet", Id = Guid.NewGuid()
            });
            var walletController = new WalletController(Mediator.Object);

            //Action
            var result = await walletController.Post(createWallet);

            //Assert
            Assert.IsType <CreatedResult>(result);
        }