PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/Source/Bifrost.Specs/Sagas/for_Saga/when_checking_if_a_chapter_is_in_saga_and_chapter_is_in_saga.cs

#
C# | 26 lines | 20 code | 6 blank | 0 comment | 0 complexity | 32598a932226ffa8b1a3ce2915088a3b MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using Bifrost.Fakes.Sagas;
  2. using Machine.Specifications;
  3. namespace Bifrost.Specs.Sagas.for_Saga
  4. {
  5. public class when_checking_if_a_chapter_is_in_saga_and_chapter_is_in_saga : given.a_saga
  6. {
  7. static TransitionalChapter first_chapter;
  8. static NonTransitionalChapter second_chapter;
  9. static bool contains;
  10. Establish context = () =>
  11. {
  12. first_chapter = new TransitionalChapter();
  13. second_chapter = new NonTransitionalChapter();
  14. saga.AddChapter(first_chapter);
  15. saga.AddChapter(second_chapter);
  16. };
  17. Because of = () => contains = saga.Contains<NonTransitionalChapter>();
  18. It should_return_true = () => contains.ShouldBeTrue();
  19. }
  20. }