public static IWebCommunicationResponse CreateWebCommunicationResponse(string contentType, long contentLength, string content)
 {
     IWebCommunicationResponse webCommunicationResponse = new WebCommunicationResponse();
     webCommunicationResponse.ContentType = contentType;
     webCommunicationResponse.ContentLength = contentLength;
     webCommunicationResponse.Content = content;
     return webCommunicationResponse;
 }
        public static IWebCommunicationResponse CreateWebCommunicationResponse(string contentType, long contentLength, string content)
        {
            IWebCommunicationResponse webCommunicationResponse = new WebCommunicationResponse();

            webCommunicationResponse.ContentType   = contentType;
            webCommunicationResponse.ContentLength = contentLength;
            webCommunicationResponse.Content       = content;
            return(webCommunicationResponse);
        }
Beispiel #3
0
        public void GetTest_ExpectedReturnedServiceInformation()
        {
            WebCommunicationResponse webCommResp = new WebCommunicationResponse();
            WebCommunication         webRequest  = new WebCommunication();

            webCommResp.Content = "tabIndex";
            var uri = String.Format("{0}{1}", webserverURI, "Acceptance Testing Resources/TabIndexInject");
            IWebCommunicationResponse actual = webRequest.Get(uri);

            // Assert
            StringAssert.Contains(actual.Content, "<tabIndex></tabIndex>");
        }
Beispiel #4
0
        public void PostTest_ExpectedReturnedDataWithPostData()
        {
            WebCommunicationResponse webCommResp = new WebCommunicationResponse();
            WebCommunication         webRequest  = new WebCommunication();

            webCommResp.Content = "tabIndex";
            var          uri  = String.Format("{0}{1}", webserverURI, "Acceptance Testing Resources/TabIndexInject");
            const string data = "Dev2tabIndex=1";
            IWebCommunicationResponse actual = webRequest.Post(uri, data);
            XElement serializedActual        = XElement.Parse(actual.Content);

            XElement actualFinding = serializedActual.Descendants().First(c => c.Name == "tabIndex");

            // Assert
            StringAssert.Contains(actualFinding.Value, "tabindex=\"1\"");
        }