public void TestInvalidContentTypeForcePasswordChange() { var handler = new ForcePasswordChangeManager(); var response = handler.ForcePasswordChange <object>(new Dictionary <string, object>(), System.Net.Http.HttpMethod.Post, "application/text"); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.UnsupportedMediaType), $"Request force password change api with content type = application/text successfully."); }
public void TestForcePasswordChangeByOtherMethod(HttpMethod httpMethod) { var handler = new ForcePasswordChangeManager(); var response = handler.ForcePasswordChange <object>(new Dictionary <string, object>(), HttpMethodMapper[httpMethod]); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.MethodNotAllowed), $"Still able to request force password change api with {httpMethod} method."); }