public void CreateRequestMessage_WhenUrlIsProvided_ShouldCreateMessageAsExpected() { var result = _sut.CreateRequestMessage("http://testurl.com/relative/test", HttpMethod.Get).Build(); result.RequestUri.Should().Be("http://testurl.com/relative/test"); result.Method.Should().Be(HttpMethod.Get); }
public void CreateRequestMessage_WhenBaseUrlAndRelativeUrlAreProvided_ShouldCreateMessageAsExpected() { var sut = new HttpRequestMessageBuilder(Substitute.For <ISerialization>()); var result = sut.CreateRequestMessage("http://testurl.com/", "relative/test", HttpMethod.Get).Build(); result.RequestUri.Should().Be("http://testurl.com/relative/test"); result.Method.Should().Be(HttpMethod.Get); }