示例#1
0
        public SqlIntegrationTest()
        {
            this.aggregateId = Guid.NewGuid();
            this.bus         = A.Fake <IDeliverMessages>();

            var factory       = new EventStoreFactory();
            var configuration = new ContainerLessEventStoreConfiguration(factory);

            configuration.UseSqlEventStore();

            this.testee = factory.Create(configuration, bus);
        }
示例#2
0
        public IntegrationTest()
        {
            var factory       = new EventStoreFactory();
            var configuration = new ContainerLessEventStoreConfiguration(factory);

            configuration.UseRavenEventStore(this.DocumentStore);

            var bus = A.Fake <IDeliverMessages>();

            var eventStore = factory.Create(configuration, bus);

            this.repository = new EventStoreRepository(eventStore).WithGlobalSnapshotStrategy(10);
        }
        public void CanOpenTypedEventStream()
        {
            var factory       = new EventStoreFactory();
            var configuration = new ContainerLessEventStoreConfiguration(factory);

            configuration.UseRavenEventStore(this.DocumentStore);

            var bus = A.Fake <IDeliverMessages>();

            var testee = factory.Create(configuration, bus);

            var eventStream = testee.OpenStream <MyStaticEventSourcedAggregateRoot>(Guid.NewGuid());

            eventStream.Should().BeAssignableTo <RavenEventStream <MyStaticEventSourcedAggregateRoot> >();
        }