Beispiel #1
0
        public void SetLocale_ShouldSetCorrectlyTest()
        {
            var config = new ApiConfiguration();

            config = config.SetLocale(Locale.TraditionalChinese);
            config.ApiRegion.Should().BeEquivalentTo(default(Region));
            config.ResultLocale.Should().BeEquivalentTo(Locale.TraditionalChinese);
        }
        public void SetLocale_LocaleParameter_ExpectedLocale()
        {
            var config = new ApiConfiguration(Region.UnitedStates, Locale.AmericanEnglish, "anyapikey");

            config = config.SetLocale(Locale.TraditionalChinese);
            config.ApiRegion.Should().BeEquivalentTo(Region.UnitedStates);
            config.ResultLocale.Should().BeEquivalentTo(Locale.TraditionalChinese);
        }