コード例 #1
0
        public void applies_to_type(Type eventType, bool shouldApply)
        {
            var aggregate = new SampleAggregate();

            aggregate.AppliesTo(new Type[] { eventType })
            .ShouldBe(shouldApply);
        }
コード例 #2
0
        public void adding_filter_for_aggregate_type()
        {
            var projection = new SampleAggregate();

            projection.CompileAndAssertValidity();

            using var store = DocumentStore.For(ConnectionSource.ConnectionString);
            var filters = projection.BuildFilters(store);

            var filter = filters.OfType <AggregateTypeFilter>().Single();

            filter.AggregateType.ShouldBe(typeof(MyAggregate));
        }