Ejemplo n.º 1
0
        public void Set_ProvideLocalizedContentDictionary_SetsProperty()
        {
            var testClass = new TestClassA();

            var localizedContent = new Dictionary <string, string>
            {
                { DEFAULT_LANGUAGE, ANY_STRING_1 },
                { OTHER_LANGUAGE, ANY_STRING_2 }
            };

            testClass.Set(i => i.PropertyA, localizedContent);

            var localized = testClass.Localize(DEFAULT_LANGUAGE);

            Assert.Equal(ANY_STRING_1, localized.PropertyA);
        }
Ejemplo n.º 2
0
        public void Set_ProvideLocalizedContentArray_SetsProperty()
        {
            var testClass = new TestClassA();

            var localizedContent = new[]
            {
                new LocalizedContent(DEFAULT_LANGUAGE, ANY_STRING_1),
                new LocalizedContent(OTHER_LANGUAGE, ANY_STRING_2)
            };

            testClass.Set(i => i.PropertyA, localizedContent);

            var localized = testClass.Localize(DEFAULT_LANGUAGE);

            Assert.Equal(ANY_STRING_1, localized.PropertyA);
        }