/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
Possible License(s): CC-BY-SA-3.0
- using Bifrost.Events;
- using Bifrost.Execution;
- using Bifrost.Fakes.Sagas;
- using Bifrost.Sagas;
- using Bifrost.Serialization;
- using Machine.Specifications;
- using Moq;
-
- namespace Bifrost.Specs.Sagas.for_SagaConverter.given
- {
- public class a_saga_converter_and_a_saga
- {
- protected static SagaWithOneChapterProperty saga;
- protected const string expected_key = "A_Magical_Key";
- protected const string expected_partition = "A_Magical_Partition";
- protected static SagaConverter saga_converter;
- protected static Mock<IContainer> container_mock;
- protected static Mock<IEventConverter> event_converter_mock;
- protected static Mock<ISerializer> serializer_mock;
-
- Establish context = () =>
- {
- saga = new SagaWithOneChapterProperty {Key = expected_key, Partition = expected_partition};
-
- container_mock = new Mock<IContainer>();
- event_converter_mock = new Mock<IEventConverter>();
- serializer_mock = new Mock<ISerializer>();
- saga_converter = new SagaConverter(container_mock.Object, event_converter_mock.Object, serializer_mock.Object);
- };
- }
- }