Ejemplo n.º 1
0
        public void ReadingPasswordSettingsInjection(Common.InjectionInput injectionInput)
        {
            var request = new Dictionary <string, string>()
            {
                ["id"] = Common.InjectionInputMapper[injectionInput],
            };
            var handler  = new WebPasswordManager();
            var response = handler.Password <PasswordSettingsResponse>(request, System.Net.Http.HttpMethod.Get);

            PrAssert.That(response.HttpStatusCode, PrIs.EqualTo(HttpStatusCode.BadRequest));
        }
Ejemplo n.º 2
0
        public void WritingPasswordSettingsInvalidFieldInjection(string field, Common.InjectionInput injectionInput)
        {
            var request = new Dictionary <string, object>()
            {
                ["companyId"]       = Common.OldCompanyId.ToString(),
                ["minLength"]       = Common.DefaultMinLength,
                ["checkComplexity"] = false,
            };

            request[field] = Common.InjectionInputMapper[injectionInput];
            var handler  = new WebPasswordManager();
            var response = handler.Password <object>(request, System.Net.Http.HttpMethod.Put);

            PrAssert.That(response.HttpStatusCode, PrIs.EqualTo(HttpStatusCode.BadRequest));
        }