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>"); }
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\""); }