Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some refactoring of the fakes package (Azure#20831)
* Some refactoring of the fakes package Deeper testing uncovered some deficiencies as well as general API improvements like slight renaming and adding options types. Marshalling APIs (used by fake server) now take an any type instead of a Responder[T] in order to handle cases where we marshal from a scalar. Added support for binary, text, and XML formats (binary was halfway there already, supporting form and multipart but not vanilla). Added support for specifying an HTTP status code in a fake response. Added and cleaned up various doc comments. * fix doc comment * MarshalResponseAsText takes param by pointer * remove empty string from MarshalResponseAsText * renamed AddNonTerminalError to AddPollingError to clarify its behavior removed HTTP status values from SetReponseOptions as this will be handled by the generated fake servers. don't panic on nil request bodies. * add support for byte arrays * merge NewBinaryResponse into NewResponse with optional body params
- Loading branch information