Beispiel #1
0
        public static Aggregate.IGiven <T> ForAggregate <T>(Func <string, T> factory = null, string aggregateId = null, [CallerMemberName] string scenarioName = null) where T : IAggregate
        {
            aggregateId = aggregateId ?? "testid";
            factory     = factory ?? (id => (T)DefaultCreateAggregate.Create(typeof(T), id));

            return(new Aggregate.ScenarioBuilder <T>(factory, aggregateId, scenarioName));
        }
        public void Should_create_aggregate()
        {
            var aggregate = DefaultCreateAggregate.Create(typeof(TestAggregate), "id");

            aggregate.Should().NotBeNull();
        }