Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Feb 22, 2025
1 parent edafa5f commit a4e0c13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
14 changes: 5 additions & 9 deletions integration/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ private static async Task AssertBinary(Client client)

private static async Task AssertForm(Client client)
{
var payload = new System.Collections.Specialized.NameValueCollection
{
{ "foo", "bar" }
};
var payload = new System.Collections.Specialized.NameValueCollection();
payload.Add("foo", "bar");

var response = await client.Test().Form(payload);

Expand All @@ -113,14 +111,12 @@ private static async Task AssertForm(Client client)

private static async Task AssertJson(Client client)
{
var payload = new Dictionary<string, string>
{
{ "string", "bar" }
};
var payload = new Dictionary<string, string>();
payload.Add("foo", "bar");

var response = await client.Test().Json(payload);

if (payload != response) {
if (System.Text.Json.JsonSerializer.Serialize(payload) != System.Text.Json.JsonSerializer.Serialize(response)) {
throw new Exception("Test AssertJson failed");
}
}
Expand Down
10 changes: 2 additions & 8 deletions mockserver/initializerJson.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,11 @@
"text/plain"
]
},
"body": {
"type": "STRING",
"xml": "foobar"
}
"body": "foobar"
},
"httpResponse": {
"statusCode": 200,
"body": {
"type": "STRING",
"xml": "foobar"
}
"body": "foobar"
}
},
{
Expand Down

0 comments on commit a4e0c13

Please sign in to comment.