Преглед изворни кода

2007-10-05 Atsushi Enomoto <[email protected]>

	* WebService.cs : Do not always expect HttpContext existence.
	  Fixed bug #331183.

	* WebServiceTest.cs : new test (for bug #331183).

	* System.Web.Services_test.dll.sources : added WebServiceTest.cs.


svn path=/trunk/mcs/; revision=86996
Atsushi Eno пре 18 година
родитељ
комит
4c2389c77d

+ 4 - 0
mcs/class/System.Web.Services/ChangeLog

@@ -1,3 +1,7 @@
+2007-10-05  Atsushi Enomoto  <[email protected]>
+
+	* System.Web.Services_test.dll.sources : added WebServiceTest.cs.
+
 2007-05-08  Atsushi Enomoto  <[email protected]>
 
 	* System.Web.Services.dll.sources :

+ 6 - 1
mcs/class/System.Web.Services/System.Web.Services/ChangeLog

@@ -1,4 +1,9 @@
-2006-12-05  Atsushi Enomoto  <[email protected]>
+2007-10-05  Atsushi Enomoto  <[email protected]>
+
+	* WebService.cs : Do not always expect HttpContext existence.
+	  Fixed bug #331183.
+
+2007-10-05  Atsushi Enomoto  <[email protected]>
 
 	* WebService.cs : [ComVisible].
 

+ 1 - 1
mcs/class/System.Web.Services/System.Web.Services/WebService.cs

@@ -53,7 +53,7 @@ namespace System.Web.Services {
 		{
 			_context = HttpContext.Current;
 #if NET_2_0
-			object o = _context.Items ["WebServiceSoapVersion"];
+			object o = _context != null ? _context.Items ["WebServiceSoapVersion"] : null;
 			if (o is SoapProtocolVersion)
 				_soapVersion = (SoapProtocolVersion) o;
 #endif

+ 1 - 0
mcs/class/System.Web.Services/System.Web.Services_test.dll.sources

@@ -1,5 +1,6 @@
 System.Web.Services/WebMethodAttributeTest.cs
 System.Web.Services/WebServiceAttributeTest.cs
+System.Web.Services/WebServiceTest.cs
 System.Web.Services.Configuration/DiagnosticsElementTest.cs
 System.Web.Services.Configuration/ProtocolElementTest.cs
 System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs

+ 4 - 0
mcs/class/System.Web.Services/Test/System.Web.Services/ChangeLog

@@ -1,3 +1,7 @@
+2007-10-05  Atsushi Enomoto  <[email protected]>
+
+	* WebServiceTest.cs : new test (for bug #331183).
+
 2003-05-13  Martin Willemoes Hansen <[email protected]>
 	* Tests inherits from Assertion and Assertion. prefix is removed.
 

+ 26 - 0
mcs/class/System.Web.Services/Test/System.Web.Services/WebServiceTest.cs

@@ -0,0 +1,26 @@
+//
+// MonoTests.System.Web.Services.WebServiceTest.cs
+//
+// Author:
+//	Atsushi Enomoto  <[email protected]>
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+using NUnit.Framework;
+using System;
+using System.Web.Services;
+using System.EnterpriseServices;
+
+namespace MonoTests.System.Web.Services 
+{
+	[TestFixture]
+	public class WebServiceTest
+	{
+		[Test] // test for bug #331183(!)
+		public void Constructor ()
+		{
+			new WebService ();
+		}
+	}
+}