public void Get_StudentSchool_by_studentSchoolKey_returns_null_when_it_does_not_exist() { using (var context = new FIFContext(ContextOptions)) { var repository = new StudentSchoolRepository(context); var result = repository.Get("1-999").Result; result.ShouldBeNull(); } }
public void Get_StudentSchool_by_studentSchoolKey_returns_StudentSchool() { using (var context = new FIFContext(ContextOptions)) { var repository = new StudentSchoolRepository(context); var result = repository.Get("1-1").Result; result.ShouldSatisfyAllConditions( () => result.StudentSchoolKey.ShouldBe("1-1"), () => result.StudentKey.ShouldBe("1"), () => result.SchoolKey.ShouldBe("1"), () => result.SchoolYear.ShouldBe("2012"), () => result.StudentFirstName.ShouldBe("Tommas"), () => result.StudentMiddleName.ShouldBeNull(), () => result.StudentLastName.ShouldBe("McCarthy"), () => result.EnrollmentDateKey.ShouldBe("20120101"), () => result.GradeLevel.ShouldBe("Ninth grade"), () => result.LimitedEnglishProficiency.ShouldBeNull(), () => result.IsHispanic.ShouldBe(false), () => result.Sex.ShouldBeNull(), () => result.PictureURL.ShouldBe("Some url for the picture")); } }