public void ValidateReturnsSuccessfulOperation() { Account origin = new Account() { Funds = 7 }; Account destination = new Account() { Funds = 0 }; decimal amountToTransfer = 5m; var services = new WireTransferValidator(); var result = services.Validate(origin, destination, amountToTransfer); 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); }
public void ValidateReturnsErrorWhenInsufficientFunds() { Account origin = new Account() { Funds = 0 }; Account destination = new Account() { Funds = 0 }; decimal amountToTransfer = 5m; var services = new WireTransferValidator(); var result = services.Validate(origin, destination, amountToTransfer); Assert.IsFalse(result.IsSuccessful); Assert.AreEqual("The origin account does not have enough funds available", result.ErrorMessage); }
public void ValidatorReturnsSuccessfulOperationWithSufficientFunds() { //Preparation Account origin = new Account() { Funds = 7 }; Account destination = new Account() { Funds = 0 }; decimal amountToTransfer = 5m; //Testing var service = new WireTransferValidator(); var result = service.Validate(origin, destination, amountToTransfer); //Verification Assert.IsTrue(result.IsSuccessful); }