Ejemplo n.º 1
0
        public void AggregateRoot_Calls_Event_Handlers_By_Convention()
        {
            var root = new TestDomain(SequentialGuid.NewId());

            root.Modify();

            Assert.That(root.OnSomethingHappenedCalled);
            Assert.That(root.ApplySomethingElseHappenedCalled);
        }
Ejemplo n.º 2
0
        public void AggregateRoot_Increments_Version_For_Each_Applied_Event()
        {
            var root = new TestDomain(SequentialGuid.NewId());

            root.Modify();

            Assert.AreEqual(3, root.Version);
            Assert.AreEqual(3, root.AppliedEvents.Count);
        }
Ejemplo n.º 3
0
        public void AggregateRoot_Increments_Version_For_Each_Applied_Event()
        {
            var root = new TestDomain(SequentialGuid.NewId());

            root.Modify();

            Assert.AreEqual(3, root.Version);
            Assert.AreEqual(3, root.AppliedEvents.Count);
        }
Ejemplo n.º 4
0
        public void AggregateRoot_Calls_Event_Handlers_By_Convention()
        {
            var root = new TestDomain(SequentialGuid.NewId());

            root.Modify();

            Assert.That(root.OnSomethingHappenedCalled);
            Assert.That(root.ApplySomethingElseHappenedCalled);
        }