コード例 #1
0
        public void ApplyHistoryEvents()
        {
            var agg = new FakeAggregate();

            var @event = FakeEvent.Create();

            agg.SetAggregateId(@event.AggregateId);

            agg.LoadFromHistory(new[] { new EventDescriptor(@event, 1) });

            agg.AggregateId.Should().Be(@event.AggregateId);
            agg.Text.Should().Be(@event.Text);
        }