Exemplo n.º 1
0
        public void Should_Include()
        {
            var additionalPhrases = new Dictionary <string, string>
            {
                { "Test1", "TEST1" },
                { "Test2", "TEST2" },
                { "Test3", "TEST3" },
                { Phrases.Keys.Texts.Email, "TEST_EMAIL" },
                { Phrases.Keys.Required, "TEST_REQUIRED" }
            };

            var validationContext = ValidationContext.Factory.Create(o => o.IncludeInEnglishTranslation(additionalPhrases));

            PredefinedTranslationsHelper.AssertInclude(validationContext, nameof(Phrases.English), additionalPhrases);
        }
Exemplo n.º 2
0
        public void Should_SetAsDefault()
        {
            var validationContext = ValidationContext.Factory.Create(o => o.AddPolishTranslation(true));

            PredefinedTranslationsHelper.AssertSetAsDefault(validationContext, nameof(Phrases.Polish));
        }
Exemplo n.º 3
0
        public void Should_AddTranslations()
        {
            var validationContext = ValidationContext.Factory.Create(o => o.AddPolishTranslation());

            PredefinedTranslationsHelper.AssertAddTranslations(validationContext, "Polish", new PolishTranslation());
        }