public void CanGetEndpointNamesWithoutMexEndpoints() { ServiceEndpointElement mexEndpoint = ServiceModelConfigurationManager.GetMetadataExchangeEndpoint(); ServiceEndpointElement secureMexEndpoint = ServiceModelConfigurationManager.GetSecureMetadataExchangeEndpoint(); ServiceModelConfigurationManager manager = LoadManager(); manager.AddEndpoint(Constants.ServiceName, mexEndpoint); manager.AddEndpoint(Constants.ServiceName, secureMexEndpoint); IList <string> endpointNames = manager.GetEndpointNames(Constants.ServiceName); Assert.IsFalse(endpointNames.Contains(manager.GetEndpointName(mexEndpoint))); Assert.IsFalse(endpointNames.Contains(manager.GetEndpointName(secureMexEndpoint))); }
public void CanGetEndpointNamesWithNullPredicate() { ServiceModelConfigurationManager manager = LoadManager(); manager.AddEndpoint(Constants.ServiceName, ServiceModelConfigurationManager.GetSecureMetadataExchangeEndpoint()); IList <string> endpointNames = manager.GetEndpointNames(Constants.ServiceName, null); Assert.AreEqual(3, endpointNames.Count); }
public void CanAddExistingEndpoint() { ServiceModelConfigurationManager manager = LoadManager(); ServiceEndpointElement endpoint = manager.GetEndpoint(Constants.ServiceName, Constants.EndpointName); manager.AddEndpoint(Constants.ServiceName, endpoint); Assert.AreEqual(endpoint, manager.GetEndpoint(Constants.ServiceName, Constants.EndpointName)); }
public void CanAddNewEndpoint() { ServiceEndpointElement mexEndpoint = ServiceModelConfigurationManager.GetMetadataExchangeEndpoint(); ServiceModelConfigurationManager manager = LoadManager(); manager.AddEndpoint(Constants.ServiceName, mexEndpoint); Assert.AreEqual(mexEndpoint, manager.GetEndpoint(Constants.ServiceName, manager.GetEndpointName(mexEndpoint))); }