2009-09-02 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 2 Sep 2009 10:16:21 +0000 (10:16 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 2 Sep 2009 10:16:21 +0000 (10:16 -0000)
* HttpRequestMessageProperty.cs : fix default values.

* HttpRequestMessagePropertyTest.cs : new test.

* System.ServiceModel_test.dll.sources:
  add HttpRequestMessagePropertyTest.cs

svn path=/trunk/mcs/; revision=141110

mcs/class/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs
mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpRequestMessagePropertyTest.cs [new file with mode: 0644]

index e441d4b405bff62a514cbcbce50f28804e156ea8..13fd70da048092f80956abb18b964341e8e301ed 100755 (executable)
@@ -1,3 +1,8 @@
+2009-09-02  Astushi Enomoto  <atsushi@ximian.com>
+
+       * System.ServiceModel_test.dll.sources:
+         add HttpRequestMessagePropertyTest.cs
+
 2009-08-24  Astushi Enomoto  <atsushi@ximian.com>
 
        * System.ServiceModel.dll.sources: added 
index 81e1a10f3ec460d25567b553cec9fac8a6c5163c..435952de0407b006a6b3c2895b779ed1298d4d28 100755 (executable)
@@ -1,3 +1,7 @@
+2009-09-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * HttpRequestMessageProperty.cs : fix default values.
+
 2009-08-31  Atsushi Enomoto  <atsushi@ximian.com>
 
        * HttpChannelFactory.cs, HttpRequestChannel.cs,
index 2dee755df746f298aa1cdb1ec07d4b6d69cf175f..29f14c0d38acf109f235eb62be5a34d1d16cfc64 100644 (file)
@@ -37,7 +37,7 @@ namespace System.ServiceModel.Channels
                }
 
                WebHeaderCollection headers = new WebHeaderCollection ();
-               string method, query_string;
+               string method = "POST", query_string = String.Empty;
                bool suppress_entity;
 
                public HttpRequestMessageProperty ()
index 8bab076fe3af99dde82e608380c3bade410e24bc..d11578b79e4300c21a001675e0de368f76286930 100644 (file)
@@ -15,6 +15,7 @@ System.ServiceModel.Channels/FaultConverterTest.cs
 System.ServiceModel.Channels/FaultExceptionTest.cs
 System.ServiceModel.Channels/HandlerBodyWriter.cs
 System.ServiceModel.Channels/HandlerTransportBindingElement.cs
+System.ServiceModel.Channels/HttpRequestMessagePropertyTest.cs
 System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
 System.ServiceModel.Channels/InterceptorBindingElement.cs
 System.ServiceModel.Channels/InvalidBindingElement.cs
index 939332fc7892a389c879cab37008d1ac57c8e583..70c3b59e700029a72badd4e154d83726e0544911 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * HttpRequestMessagePropertyTest.cs : new test.
+
 2009-08-31  Atsushi Enomoto  <atsushi@ximian.com>
 
        * HttpTransportBindingElementTest.cs : test for URI mismatch case.
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpRequestMessagePropertyTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpRequestMessagePropertyTest.cs
new file mode 100644 (file)
index 0000000..aad7aa0
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// HttpRequestMessagePropertyTest.cs
+//
+// Author:
+//     Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009 Novell, Inc.  http://www.novell.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.ObjectModel;
+using System.Net.Security;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Channels
+{
+       [TestFixture]
+       public class HttpRequestMessagePropertyTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var hp = new HttpRequestMessageProperty ();
+                       Assert.AreEqual (String.Empty, hp.QueryString, "#1");
+                       Assert.AreEqual ("POST", hp.Method, "#2");
+               }
+       }
+}