示例#1
0
        public void BuildEventStore()
        {
            var storeBuilder = new EventStoreBuilder(ApplicationNameSpace);

            var eventStore = storeBuilder.Build(new EventStore());

            TestUtils.SnapshotTest(eventStore);
        }
示例#2
0
        public async Task <IEventStore> GetEventStore(Assembly[] contractsRegistryAssemblies, IConcurrencyConflictResolver resolver = null)
        {
            if (!_databaseCreated)
            {
                await CreateDatabase(GetLocation());
            }

            var builder = new EventStoreBuilder()
                          .WithDefaultContractsRegistry(contractsRegistryAssemblies)
                          .WithMsSqlPersistor(ConnectionString, x =>
            {
                x.Initialize();
            })
                          .WithSerializer(new JilSerializer());

            if (resolver != null)
            {
                builder.WithConcurrencyConflictResolver(resolver);
            }

            return(builder.Build());
        }
        public void BuildingWithMissingDataThrowsException()
        {
            EventStoreBuilder builder = new EventStoreBuilder();

            Assert.Throws <Exception>(() => builder.Build());
        }