public void ThenIShouldHaveTheResponseWithExpectedInformationForMyLogInRequest(Table table)
        {
            _LogInJson = _CommonStep.CheckLogInSuccessMsg(table);

            ScenarioContext.Current.Add("accessToken", _LogInJson.datas.accessToken);

            ScenarioContext.Current.Add("tokenType", _LogInJson.datas.tokenType);
        }
        public LogInJson CheckLogInSuccessMsg(Table table)
        {
            LogInJson logInJson = SimpleJson.DeserializeObject <LogInJson>(_Settings.restResponse.Content);

            //Assertions
            _AssertionHelpers.AssertStatusCode(Int32.Parse(table.Rows[0][0]));

            _AssertionHelpers.AssertStatusDescriptionOK();

            _AssertionHelpers.AssertMessageText(table.Rows[0][1], logInJson.message);

            _AssertionHelpers.AssertExistence(logInJson.datas.accessToken);
            _AssertionHelpers.AssertExistence(logInJson.datas.tokenType);

            _AssertionHelpers.AssertEquals(ScenarioContext.Current.Get <string>("accountNumber"), logInJson.datas.accountNumber);

            _AssertionHelpers.AssertHeadersValue("Access-Control-Allow-Credentials", "true");
            _AssertionHelpers.AssertHeadersValue("Content-Length", table.Rows[0][2]);
            _AssertionHelpers.AssertHeadersValue("Content-Type", "application/json; charset");

            return(logInJson);
        }