public void assert_redirect_to_a_target() { var input = new InputModel(); FubuContinuation continuation = FubuContinuation.RedirectTo(input); continuation.AssertWasRedirectedTo(input); shouldFail(() => continuation.AssertWasRedirectedTo(new InputModel())); shouldFail(() => continuation.AssertWasContinuedToNextBehavior()); shouldFail(() => continuation.AssertWasTransferedTo<ControllerTarget>(x => x.OneInOneOut(null))); shouldFail(() => continuation.AssertWasRedirectedTo<ControllerTarget>(x => x.OneInOneOut(null))); }
public void assert_redirect_to_a_target_via_predicate() { var input = new InputModel { Name = "Luke", Age = 1 }; FubuContinuation continuation = FubuContinuation.RedirectTo(input); continuation.AssertWasRedirectedTo<InputModel>(x => x.Name == input.Name); shouldFail(() => continuation.AssertWasRedirectedTo(new InputModelWithEquals())); shouldFail(() => continuation.AssertWasTransferedTo(input)); shouldFail(() => continuation.AssertWasContinuedToNextBehavior()); shouldFail(() => continuation.AssertWasTransferedTo<ControllerTarget>(x => x.OneInOneOut(null))); shouldFail(() => continuation.AssertWasRedirectedTo<ControllerTarget>(x => x.OneInOneOut(null))); }
public void transfer_to_a_target() { var input = new InputModel(); FubuContinuation continuation = FubuContinuation.TransferTo(input); continuation.Type.ShouldEqual(ContinuationType.Transfer); continuation.Process(director); director.AssertWasCalled(x => x.TransferTo(input)); }
public void Move(InputModel model) { }
public void Go(InputModel model) { }
public void redirect_to_a_target_with_category() { var input = new InputModel(); FubuContinuation continuation = FubuContinuation.RedirectTo(input, "PUT"); continuation.Type.ShouldEqual(ContinuationType.Redirect); continuation.Process(director); director.AssertWasCalled(x => x.RedirectTo(input, "PUT")); }
public void assert_was_redirected_to_destination_respects_category() { var input = new InputModel { Name = "Luke", Age = 1 }; var continuation = FubuContinuation.RedirectTo(input, "PUT"); continuation.AssertWasRedirectedTo(input, "PUT"); shouldFail(() => continuation.AssertWasRedirectedTo(input)); shouldFail(() => continuation.AssertWasRedirectedTo(input, "GET")); }
public void assert_transfer_by_destination_respects_category() { var input = new InputModel { Name = "Luke", Age = 1 }; var continuation = FubuContinuation.TransferTo(input, "PUT"); continuation.AssertWasTransferedTo(input, "PUT"); shouldFail(() => continuation.AssertWasTransferedTo(input)); shouldFail(() => continuation.AssertWasTransferedTo(input, "GET")); }
public void transfer_to_a_target_with_a_method() { var input = new InputModel(); FubuContinuation continuation = FubuContinuation.TransferTo(input, "PUT"); continuation.Type.ShouldBe(ContinuationType.Transfer); continuation.Process(director); director.AssertWasCalled(x => x.TransferTo(input, "PUT")); }
public void redirect_to_a_target() { var input = new InputModel(); FubuContinuation continuation = FubuContinuation.RedirectTo(input); continuation.Type.ShouldBe(ContinuationType.Redirect); continuation.Process(director); director.AssertWasCalled(x => x.RedirectTo(input)); }