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 CanGetClientEndpoint()
        {
            ServiceModelConfigurationManager manager  = LoadManager();
            ChannelEndpointElement           endpoint = manager.GetEndpoint(Constants.ServiceDescription.ClientEndpointName);

            Assert.AreEqual(Constants.ServiceDescription.ClientEndpointName, endpoint.Name);
            Assert.AreEqual(Constants.ServiceDescription.ClientBehaviorConfiguration, endpoint.BehaviorConfiguration);
            Assert.AreEqual(Constants.ServiceDescription.ClientBindingName, endpoint.Binding);
        }
        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)));
        }