Exemplo n.º 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));
        }
Exemplo n.º 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));
        }