PageRenderTime 25ms CodeModel.GetById 22ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1using Bifrost.Fakes.Sagas;
 2using Machine.Specifications;
 3
 4namespace Bifrost.Specs.Sagas.for_Saga
 5{
 6	public class when_checking_if_a_chapter_is_in_saga_and_chapter_is_in_saga : given.a_saga
 7	{
 8		static TransitionalChapter first_chapter;
 9		static NonTransitionalChapter second_chapter;
10
11		static bool contains;
12
13		Establish context = () =>
14		                    	{
15		                    		first_chapter = new TransitionalChapter();
16		                    		second_chapter = new NonTransitionalChapter();
17
18		                    		saga.AddChapter(first_chapter);
19		                    		saga.AddChapter(second_chapter);
20		                    	};
21
22		Because of = () => contains = saga.Contains<NonTransitionalChapter>();
23
24		It should_return_true = () => contains.ShouldBeTrue();
25	}
26}