public void Start_after_fault_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Fault(new Exception()); Assert.Throws<ServiceTransitioningException>(() => monitor.Start()); }
public void Start_after_fault_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Fault(); monitor.Start(); }
public void Start_after_complete_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Complete(); monitor.Start(); }
public void Start_successful() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); Assert.IsFalse(monitor.IsNotStarted); Assert.IsTrue(monitor.IsInProgress); Assert.IsFalse(monitor.IsCompleted); Assert.IsFalse(monitor.IsCompletedSuccessfully); Assert.IsFalse(monitor.IsFaulted); }
public void Reset_from_faulted_success() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Fault(new Exception()); monitor.Reset(); Assert.IsTrue(monitor.IsNotStarted); Assert.IsFalse(monitor.IsInProgress); Assert.IsFalse(monitor.IsCompleted); Assert.IsFalse(monitor.IsCompletedSuccessfully); Assert.IsFalse(monitor.IsFaulted); }
public void Complete_on_faulted_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Fault(new Exception()); Assert.Throws<ServiceTransitioningException>(() => monitor.Complete()); }
public void Start_twice_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Start(); }
public void Complete_on_faulted_failure() { var monitor = new TransitionMonitor("init", "svc"); monitor.Start(); monitor.Fault(); monitor.Complete(); }