Ejemplo n.º 1
0
        public void Aggregate_SetNewId_NotDefined()
        {
            var agg = new AggregateIdTest();

            agg.SetNewId();
            agg.Id.Should().NotBeEmpty();
        }
Ejemplo n.º 2
0
        public void AggregateRoot_ctor_AsExpected()
        {
            AggregateIdTest o = new AggregateIdTest();

            o.DomainEvents.Count().Should().Be(0);
            o.SimulateAction();
            o.DomainEvents.Count().Should().Be(1);
            (o.DomainEvents.First() as TestDomainEvent).Data.Should().Be("test data");
        }