public void ThenValidateTheIMSUserGetPreconditionFailedErrorCodeForThePostS(HttpStatusCode errorCode)
        {
            var getAllResponseErrors = scenarioContext.AllRestClientExceptionErrors().ToList();

            for (int i = 0; i < getAllResponseErrors.Count; i++)
            {
                getAllResponseErrors[i].Response.StatusCode.Should().Be(errorCode, $"{restClientUser} user with {_testCfg.ImsScopes} scopes should not be able to post a new relationship without required value");
            }
        }
コード例 #2
0
        public void ThenValidateTheIMSUserErrorCodeForThePost(HttpStatusCode errorCode)
        {
            var getAllResponseErrors = scenarioContext.AllRestClientExceptionErrors().ToList();

            for (int i = 0; i < getAllResponseErrors.Count; i++)
            {
                getAllResponseErrors[i].Response.StatusCode.Should().Be(errorCode, $"{restClientUser} user with {_testCfg.ImsScopes} scopes should not be able to post a new entity");
            }
        }
コード例 #3
0
        private void RestClientExceptionErrorsCleanUp()
        {
            var restClientExceptionErrorsToDelete = scenarioContext.AllRestClientExceptionErrors().ToList();

            for (int i = 0; i < restClientExceptionErrorsToDelete.Count; i++)
            {
                Log.Information("Attempting to delete rest client exception errors from scenario context");
                scenarioContext.RemoveRestClientExceptionErrors(restClientExceptionErrorsToDelete[i]);
            }
        }
コード例 #4
0
 public static void RemoveRestClientExceptionErrors(this ScenarioContext scenarioContext, RestClientException response)
 {
     scenarioContext.AllRestClientExceptionErrors().Remove(response);
 }