コード例 #1
0
ファイル: InMemoryBusFixture.cs プロジェクト: stalla/NAAE
            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);
            }
コード例 #2
0
            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);
            }