Example #1
0
        public void VerifyHTTPResponseHeader()
        {
            var response = RestAPIUtil.GetResponse(Config.UrlToJSON);

            var contentTypeOfResponse = response.GetResponseHeader("Content-Type");

            var softAssert = new SoftAssertions();

            softAssert.That(!string.IsNullOrWhiteSpace(contentTypeOfResponse), Resource.ContentTypeIsNull);
            softAssert.That(contentTypeOfResponse.Equals(Resource.ValueOfContentType, StringComparison.InvariantCultureIgnoreCase), string.Format(Resource.IncorrectContentType, Resource.ValueOfContentType));
            softAssert.AssertAll();
        }