public void BuildStringOfItems_TestQueryItems_StringContainsItemsInExpectedFormat() { var queryItems = new SortedDictionary<string, string> { { "TestKey1", "TestValue1" }, { "TestKey2", "TestValue2" } }; var api = new WebRequestRestApiUnderTest(); // Act string queryString = api.BuildStringOfItemsUnderTest(queryItems); // Assert Assert.AreEqual(queryString, FormatQueryItemsAsQueryString(queryItems)); }
public void BuildStringOfItems_TestQueryItems_StringContainsItemsInExpectedFormat() { var queryItems = new Dictionary <string, string> { { "TestKey1", "TestValue1" }, { "TestKey2", "TestValue2" } }; var api = new WebRequestRestApiUnderTest(); // Act string queryString = api.BuildStringOfItemsUnderTest(queryItems); // Assert Assert.AreEqual(queryString, FormatQueryItemsAsQueryString(queryItems)); }
public void SendGetRequest_MockRequest_MethodIsGet() { // Arrange const string method = "GET"; const string uri = "http://foo.bar/"; var queryItems = new Dictionary <string, string>(); var api = new WebRequestRestApiUnderTest(); // Act api.SendGetRequest(uri, queryItems); // Assert Assert.AreEqual(method, api.MockWebRequest.Object.Method); }
public void SendGetRequest_MockRequest_MethodIsGet() { // Arrange const string method = "GET"; const string uri = "http://foo.bar/"; var queryItems = new SortedDictionary<string, string>(); var api = new WebRequestRestApiUnderTest(); // Act api.SendGetRequest(uri, queryItems); // Assert Assert.AreEqual(method, api.MockWebRequest.Object.Method); }