public void ValidateReturnSuccessfulOperation() { Account origin = new Account() { Funds = 7 }; Account destination = new Account() { Funds = 0 }; decimal amountToTranfer = 5m; var service = new WireTransferValidator(); var result = service.validate(origin, destination, amountToTranfer); Assert.IsTrue(result.IsSuccessful); }
public void ValidateReturnErrorWhenInsufficientsFunds() { Account origin = new Account() { Funds = 0 }; Account destination = new Account() { Funds = 0 }; decimal amountToTranfer = 5; var service = new WireTransferValidator(); var result = service.validate(origin, destination, amountToTranfer); Assert.IsFalse(result.IsSuccessful); Assert.AreEqual("El origen de la cuenta no tiene dinero disponible", result.ErrorMessage); }