Skip to content

Commit a4e0c13

Browse files
committed
fix tests
1 parent edafa5f commit a4e0c13

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

integration/csharp/Program.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,8 @@ private static async Task AssertBinary(Client client)
9999

100100
private static async Task AssertForm(Client client)
101101
{
102-
var payload = new System.Collections.Specialized.NameValueCollection
103-
{
104-
{ "foo", "bar" }
105-
};
102+
var payload = new System.Collections.Specialized.NameValueCollection();
103+
payload.Add("foo", "bar");
106104

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

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

114112
private static async Task AssertJson(Client client)
115113
{
116-
var payload = new Dictionary<string, string>
117-
{
118-
{ "string", "bar" }
119-
};
114+
var payload = new Dictionary<string, string>();
115+
payload.Add("foo", "bar");
120116

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

123-
if (payload != response) {
119+
if (System.Text.Json.JsonSerializer.Serialize(payload) != System.Text.Json.JsonSerializer.Serialize(response)) {
124120
throw new Exception("Test AssertJson failed");
125121
}
126122
}

mockserver/initializerJson.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,11 @@
144144
"text/plain"
145145
]
146146
},
147-
"body": {
148-
"type": "STRING",
149-
"xml": "foobar"
150-
}
147+
"body": "foobar"
151148
},
152149
"httpResponse": {
153150
"statusCode": 200,
154-
"body": {
155-
"type": "STRING",
156-
"xml": "foobar"
157-
}
151+
"body": "foobar"
158152
}
159153
},
160154
{

0 commit comments

Comments
 (0)