Exemple #1
0
        public void TestInvalidHeaderForcePasswordChange(InvalidUserId invalidUserId)
        {
            var request = new Dictionary <string, object>();

            InvalidUserIdMapper[invalidUserId](request);
            var handler  = new ForcePasswordChangeManager();
            var response = handler.ForcePasswordChangeDiffHeader <object>(request, System.Net.Http.HttpMethod.Post);

            PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.BadRequest), $"Request force password change api with header {invalidUserId} successfully.");
        }
Exemple #2
0
        public void TestInvalidHeaderOtherParamForcePasswordChange(string paramName, string value)
        {
            var request = new Dictionary <string, object>()
            {
                [paramName] = value,
            };
            var handler  = new ForcePasswordChangeManager();
            var response = handler.ForcePasswordChangeDiffHeader <object>(request, System.Net.Http.HttpMethod.Post);

            PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.BadRequest), $"Request force password change api with header {paramName} = {value} successfully.");
        }