diff --git a/Test/Flurl.Test.Shared/Http/TestingTests.cs b/Test/Flurl.Test.Shared/Http/TestingTests.cs index 568a16d1..460330ff 100644 --- a/Test/Flurl.Test.Shared/Http/TestingTests.cs +++ b/Test/Flurl.Test.Shared/Http/TestingTests.cs @@ -68,10 +68,20 @@ public async Task can_setup_multiple_responses() { [Test] public async Task can_assert_query_params() { await "http://www.api.com?x=111&y=222&z=333".GetAsync(); + HttpTest.ShouldHaveCalled("http://www.api.com*").WithQueryParam("x"); HttpTest.ShouldHaveCalled("http://www.api.com*").WithQueryParam("y", 222); HttpTest.ShouldHaveCalled("*").WithQueryParam("z", "*3"); HttpTest.ShouldHaveCalled("*").WithQueryParams(new { z = 333, y = 222 }); + + Assert.Throws(() => + HttpTest.ShouldHaveCalled("http://www.api.com*").WithQueryParam("w")); + Assert.Throws(() => + HttpTest.ShouldHaveCalled("http://www.api.com*").WithQueryParam("y", 223)); + Assert.Throws(() => + HttpTest.ShouldHaveCalled("*").WithQueryParam("z", "*4")); + Assert.Throws(() => + HttpTest.ShouldHaveCalled("*").WithQueryParams(new { x = 111, y = 666 })); } [Test]