PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Bifrost.Specs/Events/for_EventConverter/given/an_event_converter.cs

#
C# | 27 lines | 23 code | 4 blank | 0 comment | 0 complexity | b2906309a61d185426c374a87fa62a6c MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using Bifrost.Events;
  2. using Machine.Specifications;
  3. using Moq;
  4. using Bifrost.Serialization;
  5. using System;
  6. namespace Bifrost.Specs.Events.for_EventConverter.given
  7. {
  8. public class an_event_converter
  9. {
  10. protected static Mock<ISerializer> serializer_mock;
  11. protected static Mock<IEventMigratorManager> event_migrator_manager_mock;
  12. protected static Mock<IEventMigrationHierarchyManager> event_migration_hierarchy_manager;
  13. protected static EventConverter converter;
  14. Establish context = () =>
  15. {
  16. serializer_mock = new Mock<ISerializer>();
  17. event_migrator_manager_mock = new Mock<IEventMigratorManager>();
  18. event_migration_hierarchy_manager = new Mock<IEventMigrationHierarchyManager>();
  19. event_migration_hierarchy_manager.Setup(e => e.GetLogicalTypeForEvent(Moq.It.IsAny<Type>())).Returns((Type t) => t);
  20. converter = new EventConverter(serializer_mock.Object, event_migrator_manager_mock.Object, event_migration_hierarchy_manager.Object);
  21. };
  22. }
  23. }