Exemplo n.º 1
0
 internal TeePee(string httpClientNamedInstance, TeePeeMode mode, List <RequestMatch> matches, HttpStatusCode unmatchedStatusCode, string unmatchedBody)
 {
     HttpClientNamedInstance = httpClientNamedInstance;
     HttpHandler             = new TeePeeMessageHandler(mode, matches,
                                                        () => new HttpResponseMessage(unmatchedStatusCode)
     {
         Content = unmatchedBody == null
                                                                          ? null
                                                                          : new StringContent(unmatchedBody)
     });
 }
Exemplo n.º 2
0
 internal TeePeeMessageHandler(TeePeeMode mode, List <RequestMatch> matches, Func <HttpResponseMessage> defaultResponse)
 {
     m_Mode            = mode;
     m_Matches         = matches;
     m_DefaultResponse = defaultResponse;
 }
Exemplo n.º 3
0
 public TeePeeBuilder(string httpClientNamedInstance = null, TeePeeMode mode = default, JsonSerializerOptions bodySerializeOptions = default)
 {
     m_HttpClientNamedInstance = httpClientNamedInstance;
     m_Mode = mode;
     m_BodySerializeOptions = bodySerializeOptions ?? s_DefaultSerializeOptions;
 }