public void getting_large_json_data() { _host.Scenario(x => { x.Get.Action <JsonSerializationEndpoint>(y => y.get_large()); x.Request.Accepts("application/json"); x.ContentShouldContain("{\"guids\":["); x.ContentTypeShouldBe(MimeType.Json); x.StatusCodeShouldBeOk(); }); }
private void runPage() { _server.Scenario(_ => { _.Get.Action <FormRequestEndpoint>(x => x.get_form_conventions()); _.StatusCodeShouldBeOk(); }); }
public void when_invoke_chain_with_earlyReturnBehavior_then_httpResponse_should_complete() { var responseTask = Task.Factory.StartNew(() => _server.Scenario(x => { x.Get.Action <AsyncAction>(_ => _.AsyncCall()); })); responseTask.Wait(TimeSpan.FromSeconds(10)).ShouldBeTrue(); }
protected void execute(Func <IFubuPage <ConventionTarget>, object> func) { ConventionEndpoint.Source = func; var response = _server.Scenario(_ => { _.Get.Action <ConventionEndpoint> (x => x.get_result()); }); theResult = response.Body.ReadAsText(); }
public void end_to_end_test() { theRuntime.Scenario(_ => { _.Post.Json(new Message1Input()); _.StatusCodeShouldBeOk(); _.ContentShouldContain("\"success\":true"); }); theServiceBus.AssertWasCalled(x => x.Send(new Message1()), x => x.IgnoreArguments()); }
private void writeMartenData() { _runtime.Scenario(_ => { _.Post.Action <MartenEndpoint>(x => x.post_marten_writes()); }); _runtime.Scenario(_ => { _.Get.Action <MartenEndpoint>(x => x.get_marten_reads()); }); }
public void invoke_a_simple_string_endpoint() { host.Scenario(_ => { _.Get.Url("memory/hello"); _.ContentShouldBe("hello from the in memory host"); }); }
public void Scenario(Action <Scenario> scenario) { server.Scenario(scenario); }