Example #1
0
        public async Task EnsureCountryResolverPassesDefaultSettings()
        {
            MockApiRequestHandler mockHandler = new MockApiRequestHandler(Resources.country);
            ICountryResolver      client      = new CountryResolver("test1", mockHandler);
            bool result = await client.CheckAvailabilityAsync("xx");

            Assert.AreEqual("test1", mockHandler.LastUsedSettings.ClientId);
            Assert.AreEqual(null, mockHandler.LastUsedSettings.CountryCode);
            Assert.AreEqual(false, mockHandler.LastUsedSettings.CountryCodeBasedOnRegionInfo);
        }
Example #2
0
        public void EnsureCountryResolverPassesDefaultSettings()
        {
            MockApiRequestHandler mockHandler = new MockApiRequestHandler(FakeResponse.NotFound());
            ICountryResolver      client      = new CountryResolver("test1", mockHandler);

            client.CheckAvailability(result => Assert.IsNotNull(result, "Expected a result"), "xx");

            Assert.AreEqual("test1", mockHandler.LastUsedSettings.AppId);
            Assert.AreEqual(null, mockHandler.LastUsedSettings.CountryCode);
            Assert.AreEqual(false, mockHandler.LastUsedSettings.CountryCodeBasedOnRegionInfo);
        }