public void ExpectSwitchingToInvalidLanguageToFail() { ExpectLocaliserToInitialise(); Assert.IsFalse(Localiser.SwitchCulture("noSuchLocale")); Assert.AreEqual("en-GB", Localiser.CurrentLocale.Name); }
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)); }