mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-19 07:43:48 +01:00
Fix logic for QueryParameterMultipleValueSupport (#854)
* Add more QueryParameterMultipleValueSupport NoComma tests * fix tests * fx * cf * Fix * cf * select id, name, value from table where id in (1, 2, 3, 4, 5)
This commit is contained in:
@@ -274,7 +274,7 @@ public class QueryStringParserTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Parse_With1ParamContainingSpacesAndEqualSign()
|
||||
public void Parse_With1ParamContainingSpacesSingleQuoteAndEqualSign()
|
||||
{
|
||||
// Assign
|
||||
string query = "?q=SELECT Id from User where username='user@gmail.com'";
|
||||
@@ -287,6 +287,22 @@ public class QueryStringParserTests
|
||||
result["q"].Should().Equal(new WireMockList<string>("SELECT Id from User where username='user@gmail.com'"));
|
||||
}
|
||||
|
||||
// Issue #849
|
||||
[Fact]
|
||||
public void Parse_With1ParamContainingComma_Using_QueryParameterMultipleValueSupport_NoComma()
|
||||
{
|
||||
// Assign
|
||||
string query = "?query=SELECT id, value FROM table WHERE id = 1&test=42";
|
||||
|
||||
// Act
|
||||
var result = QueryStringParser.Parse(query, QueryParameterMultipleValueSupport.NoComma);
|
||||
|
||||
// Assert
|
||||
result.Count.Should().Be(2);
|
||||
result["query"].Should().Equal(new WireMockList<string>("SELECT id, value FROM table WHERE id = 1"));
|
||||
result["test"].Should().Equal(new WireMockList<string>("42"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Parse_WithComplex()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user