Exemplo n.º 1
0
        public async Task can_save_aggregate()
        {
            var aggregate = new Reviews.Domain.Review();

            aggregate.Apple(AutoFixture.Create <Domain.Events.V1.ReviewCreated>());
            aggregate.Apple(AutoFixture.Create <Domain.Events.V1.ReviewApproved>());

            var sut = new GesAggregateStore(Connection, null);

            var result = await sut.Save(aggregate);

            result.NextExceptedVersion.Should().Be(1);
        }
Exemplo n.º 2
0
        public async Task can_save_aggregate()
        {
            var aggregate = new Reviews.Domain.Review();

            aggregate.Apple(AutoFixture.Create <Domain.Events.V1.ReviewCreated>());
            aggregate.Apple(AutoFixture.Create <Domain.Events.V1.CaptionAndContentChanged>());


            var sut = new GesAggrigateStore(Connection, Serializer, EventTypeMapper, (a, b) => $"{a}-{b}", null);

            var result = await sut.Save(aggregate);

            result.NextExceptedVersion.Should().Be(1);
        }