public void GetOnlyCohortWithInstructorNamedZeldaOrNull() { //var ActualCohort = PracticeData/*FILL IN LINQ EXPRESSION*/; var ActualCohort = PracticeData.SingleOrDefault(cohort => cohort.PrimaryInstructor.FirstName == "Zelda"); Assert.IsNull(ActualCohort); }
public void GetOnlyCohortWithInstructorNamedZeldaOrNull() { var ActualCohort = PracticeData.SingleOrDefault(c => c.PrimaryInstructor.FirstName == "zelda"); Assert.IsNull(ActualCohort); }
public void GetOnlyCohortWithThreeJuniorInstructors() { var ActualCohort = PracticeData.SingleOrDefault(c => c.JuniorInstructors.Count == 3); Assert.AreEqual(ActualCohort, CohortBuilder.Cohort3); }
public void GetOnlyCohortWith2JuniorInstructorsOrThrowException() { var shouldThrowException = PracticeData.SingleOrDefault(c => c.JuniorInstructors.Count() == 2); }
public void GetOnlyCohortWithInstructorNamedZeldaOrNull() { var ActualCohort = PracticeData.SingleOrDefault(c => c.PrimaryInstructor.FirstName.ToLower() == "zelda" || c.JuniorInstructors.Any(ji => ji.FirstName.ToLower() == "zelda")); Assert.IsNull(ActualCohort); }
public void GetOnlyCohortThatIsFullTimeAndPrimaryInstructorBirthdayInTheFuture() { var ActualCohort = PracticeData.SingleOrDefault(c => c.FullTime && c.PrimaryInstructor.Birthday > DateTime.Today); Assert.AreEqual(ActualCohort, CohortBuilder.Cohort2); }