public void TestGetLateCustomers() { var customerManagerMock = new Mock <ICustomerManager>(); customerManagerMock.Setup(m => m.GetAllCustomers()) .Returns( new List <Customer> { new Customer { Name = "Adam", Address = "Örebro", Borrows = new List <Borrow> { new Borrow { DateOfBorrow = new DateTime(2018, 10, 10), Book = new Book { } } } }, { new Customer { Name = "Lars", Address = "Kumla", Borrows = new List <Borrow> { new Borrow { DateOfBorrow = new DateTime(2019, 10, 10), Book = new Book { } }, new Borrow { DateOfBorrow = new DateTime(2018, 10, 10), Book = new Book { } } } } } } ); var CustomerAPI = new CustomerAPI(customerManagerMock.Object, null, null); var reminderList = CustomerAPI.getListOfAllLateCustomers(); Assert.AreEqual(reminderList.Count, 2); }