public void GetWebServiceUrl() { #region WebServiceConfig string url = WebServiceConfig.GetWebServiceUri(); #endregion Assert.AreEqual("http://magenicautomation.azurewebsites.net", url); }
public void CanOverrideWebServiceDriver() { WebServiceDriver tempDriver = new WebServiceDriver(WebServiceConfig.GetWebServiceUri()); this.WebServiceDriver = tempDriver; Assert.AreEqual(this.TestObject.WebServiceManager.Get(), tempDriver); }
public static void TestCleanup() { // Do web service post run cleanup WebServiceDriver client = new WebServiceDriver(new Uri(WebServiceConfig.GetWebServiceUri())); string result = client.Delete("/api/String/Delete/1", "text/plain", true); Assert.AreEqual(string.Empty, result); }
public void WebServiceDriverUsesProxy() { string url = WebServiceConfig.GetWebServiceUri().Replace("https://", "http://"); this.WebServiceDriver.HttpClient.BaseAddress = new Uri(url); this.WebServiceDriver.GetWithResponse("/api/XML_JSON/GetAllProducts", "application/json"); bool proxyUsed = RequestsHistory.Values.Any(r => r.RequestUri.ToString().Contains("/api/XML_JSON/GetAllProducts")); Assert.IsTrue(proxyUsed, "Failed to assert the proxy was used by the Web Service Driver."); }
public void GetXmlDeserialized() { WebServiceDriver client = new WebServiceDriver(new Uri(WebServiceConfig.GetWebServiceUri())); client.Get <ArrayOfProduct>("/api/XML_JSON/GetAllProducts", "application/xml", false); }
public void OverrideWorksForFactory() { HttpClient factoryClient = Magenic.Maqs.BaseWebServiceTest.HttpClientFactory.GetDefaultClient(); Assert.AreEqual(WebServiceConfig.GetWebServiceUri() + "/", factoryClient.BaseAddress.ToString()); }