public void GetFirstCohortWith2JuniorInstructors() { var ActualCohort = PracticeData.FirstOrDefault(c => c.JuniorInstructors.Count() == 2); Assert.AreEqual(ActualCohort, CohortBuilder.Cohort1); }
[TestMethod]//?? public void GetFirstCohortWithInstructorNamedZeldaOrNull() { var ActualCohort = PracticeData.FirstOrDefault(c => c.PrimaryInstructor.FirstName.ToLower() == "zelda" || c.JuniorInstructors.Any(ji => ji.FirstName.ToLower() == "zelda")); Assert.IsNull(ActualCohort); }
public void GetFirstCohortThatIsFullTimeAndPrimaryInstructorBirthdayInTheFuture() { var ActualCohort = PracticeData.FirstOrDefault(c => c.FullTime && c.PrimaryInstructor.Birthday > DateTime.Today); Assert.AreEqual(ActualCohort, CohortBuilder.Cohort2); }
public void GetFirstCohortWherePrimaryInstructorIsKate() { var ActualCohort = PracticeData.FirstOrDefault(c => c.PrimaryInstructor.FirstName.ToLower() == "kate"); Assert.AreEqual(ActualCohort, CohortBuilder.Cohort4); }
public void GetFirstCohortWithInstructorNamedZeldaOrNull() { var ActualCohort = PracticeData.FirstOrDefault(c => { return(c.PrimaryInstructor.FirstName == "Zelda"); }); Assert.IsNull(ActualCohort); }
public void GetFirstCohortWithInstructorNamedZeldaOrNull() { var ActualCohort = PracticeData.FirstOrDefault(cohort => cohort.PrimaryInstructor.FirstName == "Zelda"); /*FILL IN LINQ EXPRESSION*/; Assert.IsNull(ActualCohort); }