Inheritance: IYandexApiConfiguration
        public YandexDirectService(YandexDirectConfiguration configuration)
        {
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            Configuration = configuration;
            YandexApiClient = new JsonYandexApiClient(configuration);

            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true;
        }
        public void SettingsCanBeReadFromConfiguration()
        {
            var configuration = new YandexDirectConfiguration();

            Assert.AreEqual(new Uri("http://serviceUrl/"), configuration.ServiceUrl);
            Assert.AreEqual(YandexApiLanguage.Ukrainian, configuration.Language);

            Assert.IsInstanceOfType(configuration.AuthProvider, typeof(FileCertificateAuthProvider));

            Assert.AreEqual("loginValue", ((FileCertificateAuthProvider)configuration.AuthProvider).Login);
            Assert.AreEqual("tokenValue", ((FileCertificateAuthProvider)configuration.AuthProvider).MasterToken);
            Assert.AreEqual("pathValue", ((FileCertificateAuthProvider)configuration.AuthProvider).CertificatePath);
            Assert.AreEqual(null, ((FileCertificateAuthProvider)configuration.AuthProvider).CertificatePassword);
        }