Permalink
Browse files

Refactor HttpClient interface

  • Loading branch information...
1 parent b8811ba commit e40c0f4ec7e2602de0304b5f28e28c1bf1f649ea @igstan committed Oct 25, 2010
Showing with 22 additions and 0 deletions.
  1. +18 −0 GoogleReader.API.Tests/GoogleReaderTest.cs
  2. +4 −0 GoogleReader.API/HttpClient.cs
@@ -126,11 +126,29 @@ public string GET(string url, IDictionary<string, string> args)
return ExpectedResponse;
}
+ public string GET(string url, IDictionary<string, string> args, IDictionary<string, string> headers)
+ {
+ Assert.AreEqual(ExpectedUrl, url);
+ return ExpectedResponse;
+ }
+
+ public string POST(string url)
+ {
+ Assert.AreEqual(ExpectedUrl, url);
+ return ExpectedResponse;
+ }
+
public string POST(string url, IDictionary<string, string> args)
{
Assert.AreEqual(ExpectedUrl, url);
return ExpectedResponse;
}
+
+ public string POST(string url, IDictionary<string, string> args, IDictionary<string, string> headers)
+ {
+ Assert.AreEqual(ExpectedUrl, url);
+ return ExpectedResponse;
+ }
}
}
}
@@ -9,6 +9,10 @@ public interface HttpClient
{
string GET(string url);
string GET(string url, IDictionary<string, string> args);
+ string GET(string url, IDictionary<string, string> args, IDictionary<string, string> headers);
+
+ string POST(string url);
string POST(string url, IDictionary<string, string> args);
+ string POST(string url, IDictionary<string, string> args, IDictionary<string, string> headers);
}
}

0 comments on commit e40c0f4

Please sign in to comment.