// [InlineData(StreetAddressTypeEnum.Both, AddressTypeEnum.Postal, "street", "pobox", "11D495DE-E1E7-4B57-BC86-20A87BA83324")] // [InlineData(StreetAddressTypeEnum.Both, AddressTypeEnum.Visiting, "street", "", "11D495DE-E1E7-4B57-BC86-20A87BA83324")] // [InlineData(StreetAddressTypeEnum.Both, AddressTypeEnum.Postal, "", "pobox", "11D495DE-E1E7-4B57-BC86-20A87BA83324")] // [InlineData(StreetAddressTypeEnum.Both, AddressTypeEnum.Visiting, "", "", "11D495DE-E1E7-4B57-BC86-20A87BA83324")] public void TranslateAddress(AddressTypeEnum type, AddressCharacterEnum addressCharacter, string street, string pobox, string postalCodeId) { var model = CreateModel(); model.AddressCharacter = addressCharacter; model.StreetType = type.ToString(); // model.Street = street; var poBox = new Dictionary <string, string>(); poBox.Add(LanguageCode.fi.ToString(), pobox); model.PoBox = poBox; model.PostalCode = string.IsNullOrEmpty(postalCodeId) ? null : new VmPostalCode { Id = postalCodeId.ParseToGuid() ?? Guid.Empty }; var toTranslate = new List <VmAddressSimple>() { model }; var translations = RunTranslationModelToEntityTest <VmAddressSimple, Address>(translators, toTranslate, unitOfWorkMock); var translation = translations.First(); Assert.Equal(toTranslate.Count, translations.Count); CheckTranslation(model, translation, type); }
public void TranslateLocationChannelAddress(AddressCharacterEnum addressCharacter) { var model = CreateModel(); model.AddressCharacter = addressCharacter; var toTranslate = new List <VmAddressSimple>() { model }; var translations = RunTranslationModelToEntityTest <VmAddressSimple, ServiceLocationChannelAddress>(translators, toTranslate, unitOfWorkMock); var translation = translations.First(); Assert.Equal(toTranslate.Count, translations.Count); CheckTranslation(model, translation); }
public VmAddressSimple SetMissingValues(VmAddressSimple hour, AddressCharacterEnum character) { hour.AddressCharacter = character; return(hour); }