public void AssertLocalizationCanBeInjectedInstance()
        {
            var instance = new LocalizableInstanceClass();

            Localizer.Inject(instance, _localization);

            Assert.AreEqual("world", instance.WorldString.Localize("en-US"));
        }
Пример #2
0
        public void AssertLocalizationCanBeInjectedInstance()
        {
            var localization = new LocalizationBuilder()
                               .UseJsonFiles("locales")
                               .Build();

            var instance = new LocalizableInstanceClass();

            Localizer.Inject(instance, localization);

            Assert.AreEqual("world", instance.WorldString.Localize("en-US"));
        }