Example #1
0
        private void BorrowBooks()
        {
            Console.WriteLine("Enter Client Id: ");
            int    Id     = int.Parse(Console.ReadLine());
            Client client = clientBusiness.Get(Id);

            if (client != null)
            {
                Console.WriteLine("Enter Books to Borrow: ");
                string[] books = Console.ReadLine().Split(" ");
                clientBusiness.BorrowBooks(Id, books);
                Console.WriteLine("Done.");
            }
            else
            {
                Console.WriteLine("Client not found!");
            }
        }
Example #2
0
 public void TestIfBorrowBooksUpdatesBook()
 {
     try { clientBusiness.BorrowBooks(2, new string[] { "BBB" }); }
     catch { mockContext.Verify(m => m.Entry(It.IsAny <Book>()), Times.Once()); }
 }