Exemple #1
0
        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"));
        }
Exemple #2
0
            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);
            }