PageRenderTime 71ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Sagas/for_SagaNarrator/when_concluding_a_saga_that_is_continuing_when_there_are_no_exceptions_or_validation_errors.cs

#
C# | 29 lines | 25 code | 4 blank | 0 comment | 0 complexity | 0c16a247d957ba154f2be23d23711b25 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using Bifrost.Fakes.Sagas;
  2. using Bifrost.Sagas;
  3. using Machine.Specifications;
  4. namespace Bifrost.Specs.Sagas.for_SagaNarrator
  5. {
  6. [Subject(typeof(SagaNarrator))]
  7. public class when_concluding_a_saga_that_is_continuing_when_there_are_no_exceptions_or_validation_errors : given.a_saga_narrator
  8. {
  9. static SagaWithOneChapterProperty saga;
  10. static IChapter chapter;
  11. static SagaConclusion conclusion;
  12. Establish context = () =>
  13. {
  14. chapter = new SimpleChapter();
  15. saga = new SagaWithOneChapterProperty(chapter);
  16. saga.Begin();
  17. saga.Continue();
  18. };
  19. Because of = () => conclusion = narrator.Conclude(saga);
  20. It should_have_a_successful_conclusion = () => conclusion.Success.ShouldBeTrue();
  21. It should_be_valid = () => conclusion.Invalid.ShouldBeFalse();
  22. It should_have_a_status_of_concluded = () => saga.IsConcluded.ShouldBeTrue();
  23. It should_have_called_the_on_conclude_method = () => saga.OnConcludeCalled.ShouldEqual(1);
  24. }
  25. }