You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,17 @@ module Tests =
76
76
77
77
if you prefer to use C# for testing, some extension methods are provided to use with C# as well:
78
78
79
-
`GETJ, PUTJ, POSTJ, DELETEJ`
79
+
`GETJ, PUTJ, POSTJ, DELETEJ, PATCHJ`
80
+
81
+
Remember to add this snippet at the end of your `Program.cs` file for the `TestClient` to be able to pick up your configuration:
82
+
83
+
```csharp
84
+
// Program.cs
85
+
86
+
// ... all your code, until end of file.
87
+
88
+
publicpartialclassProgram { }
89
+
```
80
90
81
91
If you want to access more overloads, you can access the inspect `TestClient<T>` members and create your custom extension methods easilly.
82
92
@@ -128,7 +138,7 @@ Available HTTP methods in the test dsl to "mock" HTTP client responses are the f
128
138
129
139
### Basic
130
140
131
-
*`GET`, `PUT`, `POST`, `DELETE` - for accessing request, route parameters and sending back HttpResponseMessage (e.g. using R_JSON or other constructors)
141
+
*`GET`, `PUT`, `POST`, `DELETE`, `PATCH` - for accessing request, route parameters and sending back HttpResponseMessage (e.g. using R_JSON or other constructors)
132
142
133
143
```fsharp
134
144
// example of control on request and route value dictionary
@@ -141,15 +151,15 @@ Available HTTP methods in the test dsl to "mock" HTTP client responses are the f
141
151
142
152
### JSON 📒
143
153
144
-
*`GETJ`, `PUTJ`, `POSTJ`, `DELETEJ` - for objects converted to JSON content
154
+
*`GETJ`, `PUTJ`, `POSTJ`, `DELETEJ`, `PATCHJ` - for objects converted to JSON content
145
155
146
156
```fsharp
147
157
GETJ "/yetAnotherOne" {| Success = true |}
148
158
```
149
159
150
160
### ASYNC Overloads (task) ⚡️
151
161
152
-
*`GET_ASYNC`, `PUT_ASYNC`, `POST_ASYNC`, `DELETE_ASYNC` - for handling asynchronous requests inside a task computation expression (async/await) and mock dynamically
162
+
*`GET_ASYNC`, `PUT_ASYNC`, `POST_ASYNC`, `DELETE_ASYNC`, `PATCH_ASYNC` - for handling asynchronous requests inside a task computation expression (async/await) and mock dynamically
153
163
154
164
```fsharp
155
165
// example of control on request and route value dictionary
0 commit comments