Dear
Inside VS 2015 with C # I created a dll project in which I make a reference to a WS from one of our suppliers, after that I created a unit testing project where I call the service without further ado with its constructor
ServiceHotelClient serviceHotelClient = new ServiceHotelClient();
I added the necessary namespace with using
and it turns out that I have the following error
El código de usuario no controló System.InvalidOperationException HResult=-2146233079 Message=No se encontró el elemento de extremo predeterminado que hace referencia al contrato 'WSServiceReference.IServiceHotel' en la sección de configuración de cliente de ServiceModel. La razón puede ser que no se encontró ningún archivo de configuración para la aplicación o que no se encontró ningún elemento de extremo correspondiente a este contrato en el elemento de cliente. Source=System.ServiceModel StackTrace: en System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName) en System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration) en System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName) en System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) en System.ServiceModel.ChannelFactory'1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) en System.ServiceModel.ConfigurationEndpointTrait'1.CreateSimplexFactory() en System.ServiceModel.ConfigurationEndpointTrait'1.CreateChannelFactory() en System.ServiceModel.ClientBase'1.CreateChannelFactoryRef(EndpointTrait'1 endpointTrait) en System.ServiceModel.ClientBase'1.InitializeChannelFactoryRef() en System.ServiceModel.ClientBase'1..ctor() en BusinessAgent_WS.WSServiceReference.ServiceHotelClient..ctor() en D:\Codigo\BusinessAgent_WS\BusinessAgent_WS\Service References\WSServiceReference\Reference.cs:línea 1630 en Netactica.Net.Core.Source.WS.WSManager..ctor(Credential credential) en D:\Codigo\BusinessAgent_WS\BusinessAgent_WS\WSManager.cs:línea 24 en UnitTestProject1.UnitTest1.TestMethod1() en D:\Codigo\BusinessAgent_WS\UnitTestProject1\UnitTest1.cs:línea 34 InnerException:
I would appreciate your support