Пример #1
0
        public void ThenTheResponseShouldContainTheCorrectCapitalAndLargestCity(string capital, string largestCity)
        {
            city = GetCity();

            VerifyAsserts.AreEqual(capital, city[0], "The Capital City of --- " + _state + " --- is not as expected");

            if (largestCity == "")
            {
                largestCity = null;
            }

            VerifyAsserts.AreEqual(largestCity, city[1], "The Largest City of --- " + _state + " --- is not as expected");
        }
Пример #2
0
        public void ThenTheResponseWillNotContainTheInvalidState()
        {
            city = GetCity();

            VerifyAsserts.IsNull(city[0], "The invalid state is found in the response");
        }
Пример #3
0
 public void ThenTheResponseShouldSendAInvalidStateMessage()
 {
     VerifyAsserts.IsNull(_content.RestResponse.count, "The Results is not null. It should have been null for this invalid State Abbrevation");
     VerifyAsserts.Contains(Convert.ToString(_content.RestResponse.messages), EnvironmentVariables.NoMatchingStateFoundMessage, "The no matching state found message is not returned in the response");
 }
Пример #4
0
 public void ThenIGetACountOfRecords(string recordsCount)
 {
     VerifyAsserts.AreEqual(Convert.ToString(_content.RestResponse.result.Count), EnvironmentVariables.RecordsCount, "The total records of the States/Territories returned by the API is not correct");
     VerifyAsserts.Contains(Convert.ToString(_content.RestResponse.messages), EnvironmentVariables.TotalRecordsFoundMessage, "The total records of found message returned by the API is not right");
 }