/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
- using Bifrost.Fakes.Sagas;
- using Machine.Specifications;
-
- namespace Bifrost.Specs.Sagas.for_Saga
- {
- public class when_checking_if_a_chapter_is_in_saga_and_chapter_is_in_saga : given.a_saga
- {
- static TransitionalChapter first_chapter;
- static NonTransitionalChapter second_chapter;
-
- static bool contains;
-
- Establish context = () =>
- {
- first_chapter = new TransitionalChapter();
- second_chapter = new NonTransitionalChapter();
-
- saga.AddChapter(first_chapter);
- saga.AddChapter(second_chapter);
- };
-
- Because of = () => contains = saga.Contains<NonTransitionalChapter>();
-
- It should_return_true = () => contains.ShouldBeTrue();
- }
- }