public void Given_NoQuerystring_When_Queries_Invoked_Then_It_Should_Return_Result(string querystring) { var context = new Mock <FunctionContext>(); var baseHost = "localhost"; var uri = Uri.TryCreate($"http://{baseHost}?{querystring}", UriKind.Absolute, out var tried) ? tried : null; var req = (HttpRequestData) new FakeHttpRequestData(context.Object, uri, headers: null); var result = OpenApiHttpRequestDataExtensions.Queries(req); result.Count.Should().Be(0); }
public void Given_Null_When_Queries_Invoked_Then_It_Should_Throw_Exception() { Action action = () => OpenApiHttpRequestDataExtensions.Queries(null); action.Should().Throw <ArgumentNullException>(); }