private void Withdraw(decimal amount) { _atm = mediator.Send(new WithdrawCommand(_atm.Id, amount)); if (_atm.AnyErrors()) { Message = _atm.Project(); return; } NotifyClient("You have taken " + amount.ToString("C2")); }
public void Withrawl_Cannot_if_not_enough_change_in_Atm() { //Arranage Atm atm = new Atm(); atm.LoadMoney(Dollar); //Act atm.Withdrawal(2m); //Assert true.Should().Equals(atm.AnyErrors()); Constants.NotEnoughChange.Should().Equals(atm.Project()); }