Class ProtoTestUserExtensions

Namespace
ProtoTest.Http
Assembly
ProtoTest.Http.dll

Publishes and reads the test's signed-in user.

public static class ProtoTestUserExtensions
Inheritance
ProtoTestUserExtensions
Inherited Members

Methods

SignIn(ProtoExecutionContext, ProtoTestUser)

Signs the test in as user: later SignedInUser() reads, requests made through the HTTP clients (REST, GraphQL, gRPC) and the trace's auth entity all use it. The identity is per-test state, so the next test starts with none.

public static void SignIn(this ProtoExecutionContext context, ProtoTestUser user)

Parameters

context ProtoExecutionContext
user ProtoTestUser

SignedInUser(ProtoExecutionContext)

Returns the user the test is signed in as.

public static ProtoTestUser SignedInUser(this ProtoExecutionContext context)

Parameters

context ProtoExecutionContext

Returns

ProtoTestUser

Exceptions

InvalidOperationException

The test has no signed-in user.