public void Distimo_Request_Must_Always_Use_Json() { // Arrange var distimoService = new DistimoService(MockWebRequestService.Object, MockDistimoAuthService.Object); // Act var request = distimoService.CreateDistimoRequest(SupportedDistimoApis.Revenues, String.Empty); // Assert Assert.True(request.Address.Query.Contains("format=json")); }
public void Check_Distimo_Request_Appends_Query_String(string queryString) { // Arrange var distimoService = new DistimoService(MockWebRequestService.Object, MockDistimoAuthService.Object); // Act var request = distimoService.CreateDistimoRequest(SupportedDistimoApis.Revenues, queryString); // Assert Assert.True(request.Address.Query.Contains(queryString)); }
public void Confirm_Basic_Authentication_Is_Being_Used() { // Arrange var distimoService = new DistimoService(MockWebRequestService.Object, MockDistimoAuthService.Object); // Act var request = distimoService.CreateDistimoRequest(SupportedDistimoApis.Revenues, String.Empty); // Assert - no point is unit testing the hash beyond this, integration testing will prove if hash // algorithm is correct. Assert.True(request.Headers["Authorization"].Contains("Basic")); }