PageRenderTime 48ms CodeModel.GetById 24ms 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
Possible License(s): CC-BY-SA-3.0
  1. using Bifrost.Events;
  2. using Bifrost.Execution;
  3. using Bifrost.Fakes.Sagas;
  4. using Bifrost.Sagas;
  5. using Bifrost.Serialization;
  6. using Machine.Specifications;
  7. using Moq;
  8. namespace Bifrost.Specs.Sagas.for_SagaConverter.given
  9. {
  10. public class a_saga_converter_and_a_saga
  11. {
  12. protected static SagaWithOneChapterProperty saga;
  13. protected const string expected_key = "A_Magical_Key";
  14. protected const string expected_partition = "A_Magical_Partition";
  15. protected static SagaConverter saga_converter;
  16. protected static Mock<IContainer> container_mock;
  17. protected static Mock<IEventConverter> event_converter_mock;
  18. protected static Mock<ISerializer> serializer_mock;
  19. Establish context = () =>
  20. {
  21. saga = new SagaWithOneChapterProperty {Key = expected_key, Partition = expected_partition};
  22. container_mock = new Mock<IContainer>();
  23. event_converter_mock = new Mock<IEventConverter>();
  24. serializer_mock = new Mock<ISerializer>();
  25. saga_converter = new SagaConverter(container_mock.Object, event_converter_mock.Object, serializer_mock.Object);
  26. };
  27. }
  28. }