Пример #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);
        }
Пример #3
0
        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> >();
        }