public void TestName() { ICommandDispatcher cmdDispatcher = container.GetInstance <ICommandDispatcher>(); IEventPublisher eventPublisher = container.GetInstance <IEventPublisher>(); IMessageBus bus = new InMemoryBus(cmdDispatcher, eventPublisher); bus.Send(new TheCommand("My Command")); }
public void Send() { var command = new InMemoryBusFixture.SendMethod.FakeSaga.StartCommand(); var containerMock = new Mock <IUnityContainer>().Object; var eventStoreMock = new Mock <IEventStore>().Object; IBus bus = new InMemoryBus(containerMock, eventStoreMock); bus.RegisterSaga <FakeSaga>(); bus.Send(command); }
public void Send() { var command = new InMemoryBusFixture.SendMethod.FakeSaga.StartCommand(); var containerMock = new Mock <ITypeResolver>(); containerMock.Setup(o => o.Resolve(typeof(FakeSaga))) .Returns(new FakeSaga()); IBus bus = new InMemoryBus(containerMock.Object); bus.RegisterSaga <FakeSaga>(); bus.Send(command); }