Esempio n. 1
0
 public ServiceNameTranslatorTest()
 {
     serviceNameTranslator  = new ServiceNameTranslator(ResolveManager, TranslationPrimitives);
     nameTypeCodeTranslator = new NameTypeCodeTranslator(ResolveManager, TranslationPrimitives);
     languageCodeTranslator = new LanguageCodeTranslator(ResolveManager, TranslationPrimitives);
     unitOfWorkMock         = unitOfWorkMockSetup.Object;
 }
Esempio n. 2
0
 public TypeTranslatorTest()
 {
     languageCodeTranslator = new LanguageCodeTranslator(ResolveManager, TranslationPrimitives);
     unitOfWorkMock         = unitOfWorkMockSetup.Object as IUnitOfWork;
     RegisterDbSet(CreateCodeData <NameType>(typeof(NameTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <DescriptionType>(typeof(DescriptionTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <ProvisionType>(typeof(ProvisionTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <PublishingStatusType>(typeof(PublishingStatus)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <WebPageType>(typeof(WebPageTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <AttachmentType>(typeof(AttachmentTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <ExceptionHoursStatusType>(typeof(ExceptionHoursStatus)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <ServiceHourType>(typeof(ServiceHoursTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <ServiceChannelType>(typeof(ServiceChannelTypeEnum)), unitOfWorkMockSetup);
     RegisterDbSet(CreateCodeData <ServiceChargeType>(typeof(ServiceChargeTypeEnum)), unitOfWorkMockSetup);
 }
Esempio n. 3
0
        public void RunTestVmToEntity()
        {
            var translator                 = new ElectronicNotificationChannelTranslator(ResolveManager, TranslationPrimitives);
            var languageTranslator         = new LanguageCodeTranslator(ResolveManager, TranslationPrimitives);
            List <ITranslator> translators = new List <ITranslator> {
                translator, languageTranslator
            };
            var toTranslate = new List <string> {
                "NotificationChannelText"
            };

            var translations = RunTranslationModelToEntityTest <string, ServiceElectronicNotificationChannel>(translators, toTranslate);
            var translation  = translations.First();

            Assert.Equal(toTranslate.Count, translations.Count);
            Assert.Equal(toTranslate.First(), translation.ElectronicNotificationChannel);
            Assert.NotEqual(translation.LocalizationId, Guid.Empty);
        }