コード例 #1
0
            public void CanHandleCommandIfVersionGreaterThanZero()
            {
                var aggregate = new FakeAggregate(version: 1);
                var command = new FakeCommand();

                aggregate.Handle(command);
            }
コード例 #2
0
            public void CanNotHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command = new FakeCommand();

                Assert.Throws<InvalidOperationException>(() => aggregate.Handle(command));
            }
コード例 #3
0
            public void CanHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command = new FakeCommand();

                aggregate.Handle(command);
            }
コード例 #4
0
            public void CanHandleCommandIfVersionGreaterThanZero()
            {
                var aggregate = new FakeAggregate(version: 1);
                var command   = new FakeCommand();

                aggregate.Handle(command);
            }
コード例 #5
0
            public void CanNotHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command   = new FakeCommand();

                Assert.Throws <InvalidOperationException>(() => aggregate.Handle(command));
            }
コード例 #6
0
            public void CanHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command   = new FakeCommand();

                aggregate.Handle(command);
            }