Ejemplo n.º 1
0
            public void CanHandleCommandIfVersionGreaterThanZero()
            {
                var aggregate = new FakeAggregate(version: 1);
                var command = new FakeCommand();

                aggregate.Handle(command);
            }
Ejemplo n.º 2
0
            public void CanNotHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command = new FakeCommand();

                Assert.Throws<InvalidOperationException>(() => aggregate.Handle(command));
            }
Ejemplo n.º 3
0
            public void CanHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command = new FakeCommand();

                aggregate.Handle(command);
            }
Ejemplo n.º 4
0
            public void CanHandleCommandIfVersionGreaterThanZero()
            {
                var aggregate = new FakeAggregate(version: 1);
                var command   = new FakeCommand();

                aggregate.Handle(command);
            }
Ejemplo n.º 5
0
            public void CanNotHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command   = new FakeCommand();

                Assert.Throws <InvalidOperationException>(() => aggregate.Handle(command));
            }
Ejemplo n.º 6
0
            public void CanHandleCommandIfVersionEqualsZero()
            {
                var aggregate = new FakeAggregate(version: 0);
                var command   = new FakeCommand();

                aggregate.Handle(command);
            }