public void ThenTheOfShouldBe(string field, string objectKey, string expectedValueKey)
        {
            var    expectedValue = m_scenarioContext.Get <object>(expectedValueKey);
            object actualValue   = TransformerHelper.GetActualValue(m_scenarioContext, field, objectKey);

            AssertionHelper.AssertStrings(actualValue.ToString(), expectedValue.ToString());
        }
        public void ThenTheModifiedOfShouldBeModified(string field, string objectKey, string expectedValueKey)
        {
            var    expectedValue = m_scenarioContext.Get <object>(expectedValueKey);
            object actualValue   = TransformerHelper.GetActualValue(m_scenarioContext, field, objectKey);

            string expectedValueFixed = Regex.Replace(expectedValue.ToString(), @"\s+", string.Empty);
            string actualValueFixed   = Regex.Replace(actualValue.ToString(), @"\s+", string.Empty);

            AssertionHelper.AssertStrings(actualValueFixed, expectedValueFixed);
        }
Beispiel #3
0
    public void ThenTheResponseShouldHaveTheStatusCode(string responseKey, string expectedStatusCode)
    {
        var response = ScenarioContext.GetObjectValue <RestResponse>(responseKey);

        AssertionHelper.AssertStrings(response.StatusCode.ToString(), expectedStatusCode);
    }
 public void ThenTheResponseShouldHaveTheStatusCode(HttpResponseMessage response, string expectedStatusCode)
 {
     AssertionHelper.AssertStrings(response.ReasonPhrase, expectedStatusCode);
 }