예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }