Reconfigure() public method

public Reconfigure ( Action configure ) : void
configure Action
return void
Example #1
0
 public static void SetupStatusPlainResponse(this MockWebEndpoint endpoint, HttpStatusCode code, string text)
 {
     endpoint.Reconfigure(builder => builder.WhenGet("/status").RespondContent(code, r => new StringContent(text, Encoding.UTF8, "text/plain")));
 }
Example #2
0
 public static void SetupStatusResponse(this MockWebEndpoint endpoint, HttpStatusCode code)
 {
     endpoint.Reconfigure(builder => builder.WhenGet("/status").Respond(code));
 }
Example #3
0
 public static void SetupStatusResponse(this MockWebEndpoint endpoint, HttpStatusCode code, object model)
 {
     endpoint.Reconfigure(builder => builder.WhenGet("/status").RespondContent(code, r => new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json")));
 }