Fix code snip for unit test HttpContext (#30705)

Use correct variable to access UserState collection in code snip
pull/30713/head
Eric Schein 2023-10-17 12:06:41 +02:00 committed by GitHub
parent b47b5a4aaa
commit dd5be54c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ To configure a `HttpContext` during test setup, create a new instance and add it
var httpContext = new DefaultHttpContext();
var serverCallContext = TestServerCallContext.Create();
serviceCallContext.UserState["__HttpContext"] = httpContext;
serverCallContext.UserState["__HttpContext"] = httpContext;
```
Execute service methods with this call context to use the configured `HttpContext` instance.