File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,8 @@ private static async Task AssertBinary(Client client)
99
99
100
100
private static async Task AssertForm ( Client client )
101
101
{
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" ) ;
106
104
107
105
var response = await client . Test ( ) . Form ( payload ) ;
108
106
@@ -113,14 +111,12 @@ private static async Task AssertForm(Client client)
113
111
114
112
private static async Task AssertJson ( Client client )
115
113
{
116
- var payload = new Dictionary < string , string >
117
- {
118
- { "string" , "bar" }
119
- } ;
114
+ var payload = new Dictionary < string , string > ( ) ;
115
+ payload . Add ( "foo" , "bar" ) ;
120
116
121
117
var response = await client . Test ( ) . Json ( payload ) ;
122
118
123
- if ( payload != response ) {
119
+ if ( System . Text . Json . JsonSerializer . Serialize ( payload ) != System . Text . Json . JsonSerializer . Serialize ( response ) ) {
124
120
throw new Exception ( "Test AssertJson failed" ) ;
125
121
}
126
122
}
Original file line number Diff line number Diff line change 144
144
" text/plain"
145
145
]
146
146
},
147
- "body" : {
148
- "type" : " STRING" ,
149
- "xml" : " foobar"
150
- }
147
+ "body" : " foobar"
151
148
},
152
149
"httpResponse" : {
153
150
"statusCode" : 200 ,
154
- "body" : {
155
- "type" : " STRING" ,
156
- "xml" : " foobar"
157
- }
151
+ "body" : " foobar"
158
152
}
159
153
},
160
154
{
You can’t perform that action at this time.
0 commit comments