public void ShouldNotHaveErrorsIfSectionDoesNotExist() { Setup(); _genericRepository .Get(Arg.Any <SectionByPrimaryKeysQuery>()) .Returns(null as Web.Data.Entities.Section); _validator.ShouldNotHaveValidationErrorFor(s => s.Session, _sectionCreateModel); _validator.ShouldNotHaveValidationErrorFor(s => s.Period, _sectionCreateModel); _validator.ShouldNotHaveValidationErrorFor(s => s.Classroom, _sectionCreateModel); _validator.ShouldNotHaveValidationErrorFor(s => s.Course, _sectionCreateModel); }
public void ShouldNotHaveErrorsIfCourseDoesNotExist() { Setup(); _genericRepository .Get(Arg.Any <Expression <Func <Web.Data.Entities.ParentCourse, bool> > >()) .Returns(null as Web.Data.Entities.ParentCourse); _validator.ShouldNotHaveValidationErrorFor(c => c.ParentCourseCode, _courseCreateModel.CourseCode); }
public void ShouldNotHaveErrorsWhenLocationDoesNotExist() { Setup(); _genericRepository .Get(Arg.Any <Expression <Func <Web.Data.Entities.Location, bool> > >()) .Returns(null as Web.Data.Entities.Location); _validator.ShouldNotHaveValidationErrorFor(m => m.ClassroomIdentificationCode, _locationCreateModel.ClassroomIdentificationCode); }
public void ShouldNotHaveErrorsIfClassPeriodDoesNotExist() { Setup(); _genericRepository .Get(Arg.Any <Expression <Func <Web.Data.Entities.ClassPeriod, bool> > >()) .Returns(null as Web.Data.Entities.ClassPeriod); _validator.ShouldNotHaveValidationErrorFor(m => m.ClassPeriodName, _classPeriodCreateModel.ClassPeriodName); }
public void ShouldNotHaveErrorsIfAssessmentDoesNotExist() { SetUp(); _genericRepository .Get(Arg.Any <Expression <Func <Web.Data.Entities.Assessment, bool> > >()) .Returns(null as Web.Data.Entities.Assessment); _validator.ShouldNotHaveValidationErrorFor(a => a.AssessmentTitle, _createAssessmentModel); }