From f7648816220fa340c75c783a2e3d885a9dfbb23a Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sat, 15 Jun 2019 10:26:39 +0200 Subject: [PATCH] QueryStringParserTests --- .../Util/QueryStringParserTests.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs b/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs index 799c29406..ca547d989 100644 --- a/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs +++ b/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs @@ -188,6 +188,20 @@ public void Parse_WithMultipleParamWithSameKey() result["key"].Should().Equal(new WireMockList(new[] { "value", "anotherValue" })); } + [Fact] + public void Parse_With1ParamContainingSpacesAndEqualSign() + { + // Assign + string query = "?q=SELECT Id from User where username='user@gmail.com'"; + + // Act + var result = QueryStringParser.Parse(query); + + // Assert + result.Count.Should().Be(1); + result["q"].Should().Equal(new WireMockList("SELECT Id from User where username='user@gmail.com'")); + } + [Fact] public void Parse_WithComplex() {