Namespace ProtoTest.Grpc
Classes
- GrpcAssertionException
Represents a failed gRPC assertion.
- GrpcAttachmentOptions
Controls which gRPC request and response messages are automatically attached to a test result. Attachments are serialized to Json with camelCase field names, redacted through the shared ProtoDiagnosticCaptureOptions rules, and capped at MaxDiagnosticBodyLength.
- GrpcClientOptions
Per-client gRPC choices: metadata added to every call from the client, the hook that builds per-call metadata, and the default deadline. Values layer from
ProtoTest:Grpc:Clientover the code-based registration; the legacyProtoTest:Grpcsection still binds as a deprecated fallback, so an existing suite keeps working.
- GrpcCoverageCollector
Aggregates gRPC calls as service/method coverage from the client's observations.
- ProtoGrpcAssertions
Shape and status assertions for gRPC replies, reusing the Json shape matcher the REST and GraphQL integrations use. Protobuf maps to Json with camelCase field names, so an expected anonymous shape reads the same way as elsewhere.
- ProtoGrpcBlockingClient
The synchronous facade of a ProtoGrpcClient: callers whose test code cannot await use it to open streaming calls. Each member blocks the calling thread while authenticators and the channel are prepared, running the async work on the pool with no captured synchronization context, so an authenticator that awaits cannot deadlock against the blocked caller. Prefer OpenServerStreamingAsync<TRequest, TResponse>(Method<TRequest, TResponse>, TRequest, Action<Metadata>?, DateTime?, CancellationToken) and OpenDuplexStreamingAsync<TRequest, TResponse>(Method<TRequest, TResponse>, Action<Metadata>?, DateTime?, CancellationToken) where the test can await.
- ProtoGrpcClient
A named gRPC client created during setup by ProtoGrpcClientInitializer. Every call is traced as a
grpc.calloperation with request/response sections and sanitized metadata, applies the test's[Auth]authenticators to the call metadata, and reports agrpc.responseobservation so coverage collectors can aggregate it.
- ProtoGrpcExceptionAssertions
The
Should/ShouldNotfacade of a failed gRPC call, reached through For(RpcException). Every assertion returns the exception it asserted on.
- ProtoGrpcMessageAssertions<TResponse>
The shape-assertion facade of one gRPC reply message, reached through For<TResponse>(TResponse). Shape has no negated form, so the facade is positive-only. MatchShape(object, JsonSerializerOptions?) returns the message, so assertions chain.