1 using System.ServiceModel;
2 using System.ServiceModel.Channels;
6 namespace MonoTests.System.ServiceModel
9 public class WebHttpBindingTest
12 public void DefaultPropertyValues ()
14 WebHttpBinding b = new WebHttpBinding ();
15 Assert.AreEqual (EnvelopeVersion.None, b.EnvelopeVersion, "#1");
16 Assert.AreEqual ("http", b.Scheme, "#1");
17 Assert.AreEqual (Encoding.UTF8, b.WriteEncoding, "#2");
18 Assert.AreEqual (0x10000, b.MaxBufferSize, "#3");
20 Assert.AreEqual (0x80000, b.MaxBufferPoolSize, "#4");
22 Assert.AreEqual (0x10000, b.MaxReceivedMessageSize, "#5");
23 Assert.IsFalse (((IBindingRuntimePreferences) b).ReceiveSynchronously, "#6");
27 public void CreateBindingElements ()
29 WebHttpBinding b = new WebHttpBinding ();
30 BindingElementCollection bc = b.CreateBindingElements ();
31 Assert.AreEqual (2, bc.Count, "#1");
32 Assert.AreEqual (typeof (WebMessageEncodingBindingElement), bc [0].GetType (), "#2");
33 Assert.AreEqual (typeof (HttpTransportBindingElement), bc [1].GetType (), "#3");