}
}
+ class ThrowOnlyProxy : IWebProxy
+ {
+ public ICredentials Credentials {
+ get {
+ throw new NotImplementedException ();
+ }
+
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Uri GetProxy (Uri destination)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool IsBypassed (Uri host)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
const int WaitTimeout = 5000;
string TestHost, LocalServer;
}
}
+ [Test]
+ [Category ("RequiresBSDSockets")]
+ public void Proxy_Disabled ()
+ {
+ var pp = WebRequest.DefaultWebProxy;
+
+ try {
+ WebRequest.DefaultWebProxy = new ThrowOnlyProxy ();
+
+ var request = new HttpClientHandler {
+ UseProxy = false
+ };
+
+ var client = new HttpClient (request);
+ Assert.IsTrue (client.GetAsync ("http://google.com").Wait (5000), "needs internet access");
+ } finally {
+ WebRequest.DefaultWebProxy = pp;
+ }
+ }
+
[Test]
public void Send ()
{
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Default ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Version_1_0 ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_ClientHandlerSettings ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_CustomHeaders ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_CustomHeaders_SpecialSeparators ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_CustomHeaders_Host ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Transfer_Encoding_Chunked ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Transfer_Encoding_Custom ()
{
bool? failed = null;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Content ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Content_MaxResponseContentBufferSize ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Content_MaxResponseContentBufferSize_Error ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_NoContent ()
{
foreach (var method in new HttpMethod[] { HttpMethod.Post, HttpMethod.Put, HttpMethod.Delete }) {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Complete_Error ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Content_Get ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Content_BomEncoding ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Content_Put ()
{
bool passed = false;
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void Send_Content_Put_CustomStream ()
{
bool passed = false;
[Test]
[Category ("MobileNotWorking")] // Missing encoding
+ [Category ("RequiresBSDSockets")]
public void GetString_Many ()
{
Action<HttpListenerContext> context = (HttpListenerContext l) => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void GetByteArray_ServerError ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void DisallowAutoRedirect ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
public void RequestUriAfterRedirect ()
{
var listener = CreateListener (l => {
}
[Test]
+ [Category ("RequiresBSDSockets")]
/*
* Properties may only be modified before sending the first request.
*/