Ejemplo n.º 1
0
        public void SetRegion_ShouldSetCorrectlyTest()
        {
            var config = new ApiConfiguration();

            config.SetRegion(Region.Taiwan);
            config.ApiRegion.Should().BeEquivalentTo(Region.Taiwan);
        }
Ejemplo n.º 2
0
        public void SetRegion_ShouldNotOverrideLocaleWhenFalse()
        {
            var config = new ApiConfiguration();

            config = config.SetRegion(Region.Korea);
            config.ApiRegion.Should().BeEquivalentTo(Region.Korea);
            config.ResultLocale.Should().BeEquivalentTo(default(Locale));
        }
Ejemplo n.º 3
0
        public void SetRegionWithDefaultLocaleTest()
        {
            var config = new ApiConfiguration();

            config.SetRegion(Region.SoutheastAsia, true);
            config.ApiRegion.Should().BeEquivalentTo(Region.SoutheastAsia);
            config.ResultLocale.Should().BeEquivalentTo(Region.SoutheastAsia.GetDefaultLocale());
        }
        public void SetRegion_DoNotUseDefaultLocale_ExpectedLocale()
        {
            var config = new ApiConfiguration(Region.UnitedStates, Locale.AmericanEnglish, "anyapikey");

            config = config.SetRegion(Region.Korea, false);
            config.ApiRegion.Should().BeEquivalentTo(Region.Korea);
            config.ResultLocale.Should().BeEquivalentTo(Locale.AmericanEnglish);
        }
        public void SetRegion_RegionParameter_ExpectedRegion()
        {
            var config = new ApiConfiguration(Region.UnitedStates, Locale.AmericanEnglish, "anyapikey");

            config = config.SetRegion(Region.Korea);
            config.ApiRegion.Should().BeEquivalentTo(Region.Korea);
            config.ResultLocale.Should().BeEquivalentTo(Locale.AmericanEnglish);
        }