public void SendStatusRequestDoesNotAppendIfAdditionalQueryParametersAreNull() { // given string capturedUrl = null; spyClient.DoGetRequest(Arg.Do <string>(x => capturedUrl = x), Arg.Any <string>()) .Returns(CreateSuccessHttpResponse()); // when spyClient.SendStatusRequest(null); // then var expectedUrl = InitializeBaseUrl(); Assert.That(capturedUrl, Is.EqualTo(expectedUrl.ToString())); }