public void GetAllDogsVaccinationStatisticTest() { ReportsService reports = new ReportsService(); DateTime startPeriod = new DateTime(2011, 10, 11); DateTime endPeriod = new DateTime(2014, 10, 11); int idDog1 = 1; int idDog2 = 2; var dogsStat = reports.GetAllDogVaccinationsStatistic(startPeriod, endPeriod).ToList(); Assert.AreEqual(2, dogsStat.Count); var firstDogVaccinations = dogsStat.FirstOrDefault(t => t.IdDog == idDog1); Assert.AreEqual(2, firstDogVaccinations.Vaccinations.Count()); var secondDogVaccinations = dogsStat.FirstOrDefault(t => t.IdDog == idDog2); Assert.AreEqual(1, secondDogVaccinations.Vaccinations.Count()); }