Esempio n. 1
0
        public void CreateInstance_GivenConfig_Should_ReturnSettings()
        {
            this._settings = ReCaptchaV2Settings.CreateInstance();

            this._settings.Should().NotBeNull();
            this._settings.RequestUrl.Should().Be("https://www.google.com/recaptcha/api/siteverify");
            this._settings.ApiUrl.Should().Be("https://www.google.com/recaptcha/api.js");
            this._settings.SiteKey.Should().NotBeNullOrWhiteSpace();
            this._settings.SecretKey.Should().NotBeNullOrWhiteSpace();
        }
Esempio n. 2
0
 private static void RegisterSettings(ContainerBuilder builder)
 {
     builder.Register(p => ReCaptchaV2Settings.CreateInstance()).As <IReCaptchaV2Settings>();
 }
 public void Init()
 {
     this._settings = ReCaptchaV2Settings.CreateInstance();
 }