diff options
author | Gert Driesen <drieseng@users.sourceforge.net> | 2009-07-06 23:58:00 +0400 |
---|---|---|
committer | Gert Driesen <drieseng@users.sourceforge.net> | 2009-07-06 23:58:00 +0400 |
commit | 8d403f038171945e82ca7ce1b66679f038085962 (patch) | |
tree | 54d8dd8aa3ec0eed0cc017d9b94e9eb3b0a38418 /mcs/class/System/Test | |
parent | ba7a4ef720c1d296393d74ac6ef74de32d5015fb (diff) |
* WebConnectionStream.cs: Move and improve argument checks to match MS.
Modified CanRead and CanWrite to return false when instance is disposed.
* HttpWebRequestTest.cs: Enabled tests, and removed test that is now
covered by two separate CanTimeout tests for request and response
stream.
* HttpWebResponseStreamTest.cs: Enabled tests.
svn path=/trunk/mcs/; revision=137450
Diffstat (limited to 'mcs/class/System/Test')
-rw-r--r-- | mcs/class/System/Test/System.Net/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/System/Test/System.Net/HttpWebRequestTest.cs | 42 | ||||
-rw-r--r-- | mcs/class/System/Test/System.Net/HttpWebResponseTest.cs | 10 |
3 files changed, 15 insertions, 44 deletions
diff --git a/mcs/class/System/Test/System.Net/ChangeLog b/mcs/class/System/Test/System.Net/ChangeLog index 0d0f4c01e6c..7017382e720 100644 --- a/mcs/class/System/Test/System.Net/ChangeLog +++ b/mcs/class/System/Test/System.Net/ChangeLog @@ -1,5 +1,12 @@ 2009-07-06 Gert Driesen <drieseng@users.sourceforge.net> + * HttpWebRequestTest.cs: Enabled tests, and removed test that is now + covered by two separate CanTimeout tests for request and response + stream. + * HttpWebResponseStreamTest.cs: Enabled tests. + +2009-07-06 Gert Driesen <drieseng@users.sourceforge.net> + * HttpWebRequestTest.cs: Marked test notworking on 1.0 profile. 2009-07-06 Gert Driesen <drieseng@users.sourceforge.net> diff --git a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs index b826df9b552..13bf8327b0e 100644 --- a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs @@ -1502,38 +1502,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 - [Test] // bug #324182 -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Stream_CanTimeout () - { - IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 8764); - string url = "http://" + localEP.ToString () + "/original/"; - - // allow autoredirect - using (SocketResponder responder = new SocketResponder (localEP, new SocketRequestHandler (RedirectRequestHandler))) { - responder.Start (); - - HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url); - req.Method = "POST"; - req.Timeout = 2000; - req.ReadWriteTimeout = 2000; - req.KeepAlive = false; - Stream rs = req.GetRequestStream (); - Assert.IsTrue (rs.CanTimeout, "#1"); - rs.Close (); - using (HttpWebResponse resp = (HttpWebResponse) req.GetResponse ()) { - Stream os = resp.GetResponseStream (); - Assert.IsTrue (os.CanTimeout, "#2"); - os.Close (); - } - responder.Stop (); - } - } -#endif - [Test] // bug #353495 [Category ("NotWorking")] public void LastModifiedKind () @@ -2639,7 +2607,10 @@ namespace MonoTests.System.Net } #if NET_2_0 - [Test] + [Test] // bug #324182 +#if TARGET_JVM + [Category ("NotWorking")] +#endif public void CanTimeout () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -2665,7 +2636,6 @@ namespace MonoTests.System.Net #endif [Test] - [Category ("NotWorking")] public void CanWrite () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -2829,7 +2799,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Write_Count_Negative () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -2860,7 +2829,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Write_Count_Overflow () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -2891,7 +2859,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Write_Offset_Negative () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -2922,7 +2889,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Write_Offset_Overflow () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); diff --git a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs index 775ced585bd..dd974917525 100644 --- a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs +++ b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs @@ -665,7 +665,10 @@ namespace MonoTests.System.Net } #if NET_2_0 - [Test] + [Test] // bug #324182 +#if TARGET_JVM + [Category ("NotWorking")] +#endif public void CanTimeout () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -764,7 +767,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Read_Buffer_Null () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -816,7 +818,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Read_Count_Negative () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -869,7 +870,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Read_Count_Overflow () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -922,7 +922,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Read_Offset_Negative () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); @@ -975,7 +974,6 @@ namespace MonoTests.System.Net } [Test] - [Category ("NotWorking")] public void Read_Offset_Overflow () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000); |