Пример #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);
        }