+ [Test]
+ public void AddServiceEndpoint2_4 ()
+ {
+ ServiceHost host = new ServiceHost (typeof (HogeFuga), new Uri ("http://localhost:37564"));
+ var binding = new BasicHttpBinding ();
+ host.AddServiceEndpoint (typeof (IHoge), binding, new Uri ("http://localhost:37564"));
+ host.AddServiceEndpoint (typeof (IFuga), binding, new Uri ("http://localhost:37564"));
+
+ // Use the same binding, results in one ChannelDispatcher (actually two, for metadata/debug behavior).
+ host.Open ();
+ try {
+ Assert.AreEqual (2, host.ChannelDispatchers.Count, "#1");
+ foreach (ChannelDispatcher cd in host.ChannelDispatchers) {
+ if (cd.BindingName != binding.Name)
+ continue; // mex
+ Assert.AreEqual (2, cd.Endpoints.Count, "#2");
+ }
+ } finally {
+ host.Close ();
+ }
+ }
+