public void Create_Deposit_failed(decimal initialAmount, decimal deposit) { //Arrange var userId = Guid.NewGuid(); var result = initialAmount + deposit; //Act var fakeWallet = new Wallet(userId); fakeWallet.IncreaseBalance(initialAmount); //Assert Assert.Throws <WalletDomainException>(() => fakeWallet.AddDeposit(new Deposit(deposit))); }
public void Create_Deposit_success() { //Arrange var userId = Guid.NewGuid(); var initialAmount = 20; var deposit = 10; var result = initialAmount + deposit; //Act var fakeWallet = new Wallet(userId); fakeWallet.IncreaseBalance(initialAmount); fakeWallet.AddDeposit(new Deposit(deposit)); //Assert Assert.Equal(result, fakeWallet.Balance); }