public void GetAllFilterByDate_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new AppointmentRepository(context); int year = 2019; int month = 7; int day = 7; // Act IEnumerable <appointment> result = repository.GetAllFilterByDate(year, month, day); // Assert Assert.AreEqual(context.appointment.Where(x => x.dateTime.Year == year && x.dateTime.Month == month && x.dateTime.Day == day).Count(), result.Count()); }