public void Init() { this.model = ClassPropertyInitializator.SetProperties<OLEOPIEducationInstitutionBlock>(new OLEOPIEducationInstitutionBlock()); var locManager = new Mock<ILocalizationManager>(); locManager.Setup( s => s.GetValidatorTranslationTEST(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())) .Returns("Some test string"); this.validator = new OLEOPIEducationInstitutionBlockValidator(locManager.Object); }
/// <summary> /// Maps from web to db Model /// </summary> /// <param name="input">OLEOPIEducationInstitutionBlock Web model</param> /// <param name="dbModel">OLEOPIEducationInformationPage object model</param> private static void ToEducationInstitutionDbModel(OLEOPIEducationInstitutionBlock input, db.OLEOPIEducationInformationPage dbModel) { if (input == null || dbModel == null) { throw new ArgumentException("One of model is null"); } dbModel.EducationalInstitution = input.EducationalInstitution; dbModel.EducationalInstitutionName = input.EducationalInstitutionName; dbModel.EducationIsPresentAttendance = input.IsPresentAttendance; dbModel.EducationLanguageOfStudy = input.LanguageOfStudy; dbModel.EducationOtherLevelStudies = input.OtherLevelStudies; dbModel.EducationOtherStudies = input.OtherStudies; dbModel.EducationRegisterWhenInFinland = input.RegisterWhenInFinland; dbModel.EducationStudyExchangeProgram = input.StudyExchangeProgram; dbModel.EducationTermEndDate = input.TermEndDate; dbModel.EducationTermStartDate = input.TermStartDate; dbModel.EducationTypeOfStudies = input.TypeOfStudies; }