Ejemplo n.º 1
0
        public void valid_slicing_with_configured_slicing()
        {
            var projection = new MyCustomAggregateWithNoSlicer();

            projection.AggregateEvents(x => x.Identity <INumbered>(n => n.Number));

            projection.Slicer.ShouldBeOfType <EventSlicer <CustomAggregate, int> >();
        }
Ejemplo n.º 2
0
        public void assert_invalid_with_incomplete_slicing_rules()
        {
            var projection = new MyCustomAggregateWithNoSlicer();

            projection.AggregateEvents(x => {});

            Exception <InvalidProjectionException> .ShouldBeThrownBy(() =>
            {
                new MyCustomAggregateWithNoSlicer().AssembleAndAssertValidity();
            });
        }