PageRenderTime 13ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Sagas/for_SagaConverter/given/a_saga_converter_and_a_saga.cs

#
C# | 31 lines | 28 code | 3 blank | 0 comment | 0 complexity | a93aa8547dc02caa2189a2755ce1c9a3 MD5 | raw file
 1using Bifrost.Events;
 2using Bifrost.Execution;
 3using Bifrost.Fakes.Sagas;
 4using Bifrost.Sagas;
 5using Bifrost.Serialization;
 6using Machine.Specifications;
 7using Moq;
 8
 9namespace Bifrost.Specs.Sagas.for_SagaConverter.given
10{
11	public class a_saga_converter_and_a_saga
12	{
13		protected static SagaWithOneChapterProperty saga;
14		protected const string expected_key = "A_Magical_Key";
15		protected const string expected_partition = "A_Magical_Partition";
16		protected static SagaConverter saga_converter;
17		protected static Mock<IContainer> container_mock;
18		protected static Mock<IEventConverter> event_converter_mock;
19		protected static Mock<ISerializer> serializer_mock;
20
21		Establish context = () =>
22		                    	{
23		                    		saga = new SagaWithOneChapterProperty {Key = expected_key, Partition = expected_partition};
24
25									container_mock = new Mock<IContainer>();
26									event_converter_mock = new Mock<IEventConverter>();
27									serializer_mock = new Mock<ISerializer>();
28									saga_converter = new SagaConverter(container_mock.Object, event_converter_mock.Object, serializer_mock.Object);
29		                    	};
30	}
31}