/// <summary> /// Adds request location provided by a builder to the HTTP request message. /// </summary> /// <param name="uriTestBuilder">Builder for expected URI.</param> /// <returns>The same HTTP request message builder.</returns> public IAndHttpRequestMessageBuilder WithRequestUri(Action <IUriTestBuilder> uriTestBuilder) { var mockedUriBuilder = new MockedUriBuilder(); uriTestBuilder(mockedUriBuilder); this.requestMessage.RequestUri = mockedUriBuilder.GetUri(); return(this); }
/// <inheritdoc /> public IAndHttpRequestBuilder WithLocation(Action <IUriTestBuilder> uriBuilder) { var mockedUriBuilder = new MockedUriBuilder(); uriBuilder(mockedUriBuilder); var uri = mockedUriBuilder.GetUri(); return(this.WithLocation(uri)); }
/// <summary> /// Adds request location provided by a builder to the HTTP request message. /// </summary> /// <param name="uriTestBuilder">Builder for expected URI.</param> /// <returns>The same HTTP request message builder.</returns> public IAndHttpRequestMessageBuilder WithRequestUri(Action<IUriTestBuilder> uriTestBuilder) { var mockedUriBuilder = new MockedUriBuilder(); uriTestBuilder(mockedUriBuilder); this.requestMessage.RequestUri = mockedUriBuilder.GetUri(); return this; }