public void StateExtensions_AddTransition_NullTrigger_ThrowsNullex() { var machine = new Mock <IStateMachine <StubStateModel> >().Object; var toState = new State <StubStateModel>("to"); Assert.Throws <ArgumentNullException>(() => machine.AddGlobalTransition(null, toState)); }
public void StateExtensions_AddTransition_NullTo_ThrowsNullex() { var machine = new Mock <IStateMachine <StubStateModel> >().Object; var trigger = new Trigger("trigger"); Assert.Throws <ArgumentNullException>(() => machine.AddGlobalTransition(trigger, null)); }
public void StateExtensions_AddTransition_NullTrigger_WithGuard_ThrowsNullex() { var machine = new Mock <IStateMachine <StubStateModel> >().Object; var toState = new State <StubStateModel>("to"); Func <StubStateModel, bool> guard = s => true; Assert.Throws <ArgumentNullException>(() => machine.AddGlobalTransition(null, toState, guard)); }