public void CanEndLifecycle() { // arrange var aggregate = new LifecycleAggregate(); // act aggregate.DoSomething(); // NOTE (Cameron): Proves we can do something before we destroy. aggregate.Destroy(); Action action = () => aggregate.DoSomething(); // assert action.ShouldThrow <BusinessException>(); }
public void CanEndLifecycle() { // arrange var aggregate = new LifecycleAggregate(); // act aggregate.DoSomething(); // NOTE (Cameron): Proves we can do something before we destroy. aggregate.Destroy(); Action action = () => aggregate.DoSomething(); // assert action.ShouldThrow<BusinessException>(); }