Пример #1
0
        public void SimpleTranslateTest()
        {
            var text = m_databaseLocalizationManager.Translate("support", null, "home");

            Assert.IsNotNull(text);
            Assert.IsNotNull(text.Value);
            Assert.AreNotEqual(0, text.Value.Length);
        }
Пример #2
0
        public void TranslateConcurrentlyTest()
        {
            const string scope         = "home";
            var          keysFromScope = new[]
            {
                "support",
                "about",
                "copyright",
                "contacts",
                "links",
                "howtocite",
                "feedback",
            };

            Parallel.For(0, 1000, iteration =>
            {
                var key = keysFromScope[iteration % keysFromScope.Length];
                m_databaseLocalizationManager.Translate(key, null, scope);
            });
        }