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); }
public static AboutYou GetAboutYou(AboutYouViewModel model, MonitoringInformationViewModel monitoringInformationViewModel) { return(new AboutYou { HobbiesAndInterests = model.WhatAreYourHobbiesInterests, Improvements = model.WhatDoYouFeelYouCouldImprove, Strengths = model.WhatAreYourStrengths, Support = monitoringInformationViewModel.AnythingWeCanDoToSupportYourInterview }); }
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 }); }
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); }