/// <summary> /// Gets the customers. /// </summary> /// <returns></returns> public Customers GetCustomers() { var serviceY = new WebServiceYSoapClient(); if (!String.IsNullOrEmpty(WebServiceUrl)) { serviceY.Endpoint.Address = new EndpointAddress(WebServiceUrl); } return Conversions.ConvertCustomers(serviceY.GetCustomers()); }
public void ServiceClientConstructorTest() { var target = new WebServiceYSoapClient("WebServiceYSoap"); var customers = Conversions.ConvertCustomers(target.GetCustomers()); TestCustomers(customers); target = new WebServiceYSoapClient("WebServiceYSoap", "http://localhost:2316/WebServiceY.asmx"); customers = Conversions.ConvertCustomers(target.GetCustomers()); TestCustomers(customers); var remoteAddress = new EndpointAddress("http://localhost:2316/WebServiceY.asmx"); target = new WebServiceYSoapClient("WebServiceYSoap", remoteAddress); customers = Conversions.ConvertCustomers(target.GetCustomers()); TestCustomers(customers); target = new WebServiceYSoapClient(NewBinding(), remoteAddress); customers = Conversions.ConvertCustomers(target.GetCustomers()); TestCustomers(customers); var webCustomers = target.GetCustomers(); Assert.IsNotNull(webCustomers[0].ExtensionData); }