/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
- using Bifrost.Fakes.Sagas;
- using Bifrost.Sagas;
- using Machine.Specifications;
-
- namespace Bifrost.Specs.Sagas.for_SagaNarrator
- {
- [Subject(typeof(SagaNarrator))]
- public class when_concluding_a_saga_that_is_continuing_when_there_are_no_exceptions_or_validation_errors : given.a_saga_narrator
- {
- static SagaWithOneChapterProperty saga;
- static IChapter chapter;
- static SagaConclusion conclusion;
-
- Establish context = () =>
- {
- chapter = new SimpleChapter();
- saga = new SagaWithOneChapterProperty(chapter);
- saga.Begin();
- saga.Continue();
- };
-
- Because of = () => conclusion = narrator.Conclude(saga);
-
- It should_have_a_successful_conclusion = () => conclusion.Success.ShouldBeTrue();
- It should_be_valid = () => conclusion.Invalid.ShouldBeFalse();
- It should_have_a_status_of_concluded = () => saga.IsConcluded.ShouldBeTrue();
- It should_have_called_the_on_conclude_method = () => saga.OnConcludeCalled.ShouldEqual(1);
- }
- }