コード例 #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
ファイル: AggregateRootFixture.cs プロジェクト: johnm25/SeekU
        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
ファイル: AggregateRootFixture.cs プロジェクト: johnm25/SeekU
        public void AggregateRoot_Calls_Event_Handlers_By_Convention()
        {
            var root = new TestDomain(SequentialGuid.NewId());

            root.Modify();

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