示例#1
0
        public void ExpectRetrievingLocalisedStringToWork()
        {
            ExpectLocaliserToInitialise();

            Assert.AreEqual("Hello", TestLoc.Get(TestKeys.Test.Hello));
            Assert.AreEqual("Thanks", TestLoc.Get(TestKeys.Test.ThankYou));
            Assert.AreEqual("Goodbye", TestLoc.Get(TestKeys.Test.Goodbye));
        }
示例#2
0
        public void ExpectSwitchingToValidLanguageToWork()
        {
            ExpectLocaliserToInitialise();

            Assert.IsTrue(Localiser.SwitchCulture("fr"));

            Assert.AreEqual("Bonjour", TestLoc.Get(TestKeys.Test.Hello));
            Assert.AreEqual("Merci", TestLoc.Get(TestKeys.Test.ThankYou));
            Assert.AreEqual("Au revoir", TestLoc.Get(TestKeys.Test.Goodbye));
        }