public void CanHandleCommandIfVersionGreaterThanZero() { var aggregate = new FakeAggregate(version: 1); var command = new FakeCommand(); aggregate.Handle(command); }
public void CanNotHandleCommandIfVersionEqualsZero() { var aggregate = new FakeAggregate(version: 0); var command = new FakeCommand(); Assert.Throws<InvalidOperationException>(() => aggregate.Handle(command)); }
public void CanHandleCommandIfVersionEqualsZero() { var aggregate = new FakeAggregate(version: 0); var command = new FakeCommand(); aggregate.Handle(command); }
public void CanNotHandleCommandIfVersionEqualsZero() { var aggregate = new FakeAggregate(version: 0); var command = new FakeCommand(); Assert.Throws <InvalidOperationException>(() => aggregate.Handle(command)); }