public void TransferMinFundsFailAll([Values(190, 345)] int a, [Values(0, 20)] int b, [Values(346, 500)] int c) { Account source = new Account(); source.Deposit(a); Account destination = new Account(); destination.Deposit(b); Assert.That(() => destination = source.TransferMinFunds(destination, c), Throws.TypeOf <NotEnoughFundsException>()); }
public void TransferMinFundsFail(int a, int b, int c) { Account source = new Account(); source.Deposit(a); Account destination = new Account(); destination.Deposit(b); Assert.That(() => destination = source.TransferMinFunds(destination, c), Throws.TypeOf <NotEnoughFundsException>()); }
public void TransferMinFundsFail(int a, int b, int c) { Account source = new Account(); source.Deposit(a); Account destination = new Account(); destination.Deposit(b); destination = source.TransferMinFunds(destination, c); }
public void TransferMinFundsFailAll([Values(200, 500)] int a, [Values(0, 20)] int b, [Values(140, 120)] int c) { Account source = new Account(); source.Deposite(a); Account destination = new Account(); destination.Deposite(b); destination = source.TransferMinFunds(destination, c); }
public void ExpectedExceptionTest(int a, int b, int c) { Assert.Throws <NotEnoughFundsException>(delegate() { Account source = new Account(); source.Deposit(a); Account destination = new Account(); destination.Deposit(b); destination = source.TransferMinFunds(destination, c); }); }
public void TransferMinFunds(int a, int b, int c) { Account source = new Account(); source.Deposit(a); Account destination = new Account(); destination.Deposit(b); source.TransferMinFunds(destination, c); Assert.AreEqual(c, destination.Balance); }