private async Task <DummyAggregate> CreateDummyAggregate()
        {
            var resetCommand = new ResetDummyAggregateCommand()
            {
                Id   = Guid.NewGuid(),
                Name = "The name",
                Url  = "https://url.example.com"
            };

            var aggregate = new DummyAggregate(resetCommand);

            var sut = CreateRepository <DummyAggregate>();
            await sut.SaveAsync(aggregate);

            return(aggregate);
        }
Exemplo n.º 2
0
 public DummyAggregate(ResetDummyAggregateCommand command)
 {
     ApplyChange(new DummyCreatedEvent(command.Id, command.Name, command.Url));
 }