예제 #1
0
        public void TestValidForcePasswordChange(UserType userType)
        {
            var header = new Dictionary <string, object>()
            {
                ["userId"] = TestContext.CurrentContext.Test.Properties.Get("adminUser2Login").ToString(),
            };
            var handler  = new ForcePasswordChangeManager();
            var response = handler.ForcePasswordChangeDiffHeaderWithContent <object>(header, new Dictionary <string, object>(), System.Net.Http.HttpMethod.Post);

            PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(HttpStatusCode.NoContent), $"Not able to request force password change api with {userType}.");
        }
예제 #2
0
        public void TestInvalidBodyForcePasswordChange(InvalidUserId invalidUserId)
        {
            var request = new Dictionary <string, object>();

            InvalidUserIdMapper[invalidUserId](request);
            var header = new Dictionary <string, object>()
            {
                ["userId"] = TestContext.CurrentContext.Test.Properties.Get("adminUser2Login").ToString(),
            };
            var handler  = new ForcePasswordChangeManager();
            var response = handler.ForcePasswordChangeDiffHeaderWithContent <object>(header, request, System.Net.Http.HttpMethod.Post);

            PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.BadRequest), $"request force password change api with body {invalidUserId} successfully.");
        }