msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
GiraffeHandler - test handler for injecting error responses
A outer handler that is used during testing to provide error responses. We want to make sure that our client can handle random/different responses throughout the pipeline.
This handler can produce:
- random error response - to help us and customers create robust error handling
- preset error responses - to help us and customers tests expected error conditions
- preset successful responses - to help us and customers test variations of successful responses
- mock throttling
Design spec is required. The design should be applicable to all of our supported platforms.
This will be used internally and by customers that use our client libraries. The idea is that this will be a final handler that will mimic responses.
Some ideas:
- Preconfigured responses
- Can be used to mimic any response from the service. This can be a service mock as far as the client is concerned.
- Rules based inspection of httprequestmessage contents to provide responses.
- Access to serializers for mocking response objects.
Are we moving beyond giraffe handler? Should part of this be put in a test handler? Let's have the conversation.
We should brainstorm on how we and customers might use this. AB#7323