public void ThenTheGetResponseShouldContainTheFollowingData(Table table)
        {
            var postData = PropertyBucket.GetProperty <Dictionary <string, string> >("PostData");
            var row      = table.Rows[0];

            foreach (var kvp in row)
            {
                Assert.AreEqual(kvp.Value, postData[kvp.Key]);
            }
        }
Example #2
0
        public void ThenNavigationWillTimeOut(string flag)
        {
            bool navigationTimedOut = PropertyBucket.GetProperty <bool>("NavigationTimedOut");

            if (flag == "does")
            {
                Assert.That(navigationTimedOut, Is.True, "Navigation did not timeout");
            }
            else
            {
                Assert.That(navigationTimedOut, Is.False, "Navigation timed out");
            }
        }
        public void ThenIShouldGetAStatusCodeOf(string statusCode)
        {
            var            deleteResponse = PropertyBucket.GetProperty <IRestResponse>("DeleteResponse");
            HttpStatusCode code;

            if (Enum.TryParse(statusCode, true, out code))
            {
                Assert.AreEqual(code, deleteResponse.StatusCode);
            }
            else
            {
                throw new Exception($"Invalid HttpStatusCode specified: {statusCode}");
            }
        }
Example #4
0
        public void ThenTheSubHeaderTextShouldHaveBeen(string headerText)
        {
            string rememberedText = PropertyBucket.GetProperty <string>("W3SchoolsHeaderText");

            Assert.AreEqual(headerText, rememberedText);
        }
        public void ThenThePutOrPostDataShouldReturnInTheField(string method, string expectedValue, string fieldName)
        {
            var resultData = PropertyBucket.GetProperty <Dictionary <string, string> >($"{method}Data");

            Assert.AreEqual(expectedValue, resultData[fieldName]);
        }
        public void ThenThePostDataShouldReturnInTheField(string expectedValue, string fieldName)
        {
            var postData = PropertyBucket.GetProperty <Dictionary <string, string> >("PostData");

            Assert.AreEqual(expectedValue, postData[fieldName]);
        }