コード例 #1
0
        public void ShouldHaveErrorsOnServerWhenBlank()
        {
            var viewModel = new AboutYouViewModel();
            var viewModelServerValidator = new AboutYouViewModelServerValidator();

            viewModelServerValidator.ShouldHaveValidationErrorFor(x => x.WhatAreYourStrengths, viewModel);
            viewModelServerValidator.ShouldHaveValidationErrorFor(x => x.WhatDoYouFeelYouCouldImprove, viewModel);
            viewModelServerValidator.ShouldHaveValidationErrorFor(x => x.WhatAreYourHobbiesInterests, viewModel);
        }
コード例 #2
0
 public static AboutYou GetAboutYou(AboutYouViewModel model, MonitoringInformationViewModel monitoringInformationViewModel)
 {
     return(new AboutYou
     {
         HobbiesAndInterests = model.WhatAreYourHobbiesInterests,
         Improvements = model.WhatDoYouFeelYouCouldImprove,
         Strengths = model.WhatAreYourStrengths,
         Support = monitoringInformationViewModel.AnythingWeCanDoToSupportYourInterview
     });
 }
コード例 #3
0
 public static AboutYou GetAboutYou(AboutYouViewModel model)
 {
     return(new AboutYou
     {
         HobbiesAndInterests = model.WhatAreYourHobbiesInterests,
         Improvements = model.WhatDoYouFeelYouCouldImprove,
         Strengths = model.WhatAreYourStrengths,
         Support = model.RequiresSupportForInterview ? model.AnythingWeCanDoToSupportYourInterview : string.Empty
     });
 }
コード例 #4
0
        public void ShouldNotHaveErrorsOnSaveWhenBlank()
        {
            var viewModel = new AboutYouViewModel();
            var viewModelSaveValidator = new AboutYouViewModelSaveValidator();

            viewModelSaveValidator.ShouldNotHaveValidationErrorFor(x => x.WhatAreYourStrengths, viewModel);
            viewModelSaveValidator.ShouldNotHaveValidationErrorFor(x => x.WhatDoYouFeelYouCouldImprove, viewModel);
            viewModelSaveValidator.ShouldNotHaveValidationErrorFor(x => x.WhatAreYourHobbiesInterests, viewModel);
            viewModelSaveValidator.ShouldNotHaveValidationErrorFor(x => x.AnythingWeCanDoToSupportYourInterview, viewModel);
        }