static void Main(string[] args) { BNB banco = new BNB(); Customer customer = new Customer("Luis"); bool elegible = banco.IsElegible(customer, 125000); Console.WriteLine("\n{0} has been {1}", customer.Name, elegible ? "Approved": "Rejected"); Console.ReadKey(); }
public void CustomerAskForCredit() { Customer c = new Customer("Luis"); var response = _BNB.IsElegible(c, 5000); _mockBank.Verify(b => b.HasSufficientSavings(It.IsAny <Customer>(), It.IsAny <int>())); _mockLoan.Verify(l => l.HasNoBadLoans(It.IsAny <Customer>())); _mockCredit.Verify(cr => cr.HasGoodCredit(It.IsAny <Customer>())); Assert.IsTrue(response); }