HttpWebResponse resp = (HttpWebResponse) req.GetResponse ();
((IDisposable) resp).Dispose ();
-#if NET_2_0
WebHeaderCollection headers = resp.Headers;
Assert.AreEqual (6, headers.Count, "#1");
Assert.AreEqual ("9", headers ["Content-Length"], "#2");
Assert.AreEqual ("Wed, 08 Jan 2003 23:11:55 GMT", headers ["Last-Modified"], "#5");
Assert.AreEqual ("UserID=Miguel,StoreProfile=true", headers ["Set-Cookie"], "#6");
Assert.AreEqual ("Mono/Test", headers ["Server"], "#7");
-#else
- try {
- WebHeaderCollection headers = resp.Headers;
- Assert.Fail ("#1:" + headers);
- } catch (ObjectDisposedException ex) {
- Assert.AreEqual (typeof (ObjectDisposedException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.AreEqual (typeof (HttpWebResponse).FullName, ex.ObjectName, "#5");
- }
-#endif
}
}
}
}
-#if NET_2_0
[Test] // bug #324182
public void CanTimeout ()
{
}
}
}
-#endif
[Test]
public void CanWrite ()
}
}
-#if NET_2_0
[Test]
public void ReadTimeout ()
{
}
}
}
-#endif
[Test]
public void Write ()
}
}
-#if NET_2_0
[Test]
public void WriteTimeout ()
{
}
}
}
-#endif
}
}