(t *testing.T)
| 513 | } |
| 514 | |
| 515 | func TestAsyncTransitionNotInProgress(t *testing.T) { |
| 516 | fsm := NewFSM( |
| 517 | "start", |
| 518 | Events{ |
| 519 | {Name: "run", Src: []string{"start"}, Dst: "end"}, |
| 520 | {Name: "reset", Src: []string{"end"}, Dst: "start"}, |
| 521 | }, |
| 522 | Callbacks{}, |
| 523 | ) |
| 524 | err := fsm.Transition() |
| 525 | if _, ok := err.(NotInTransitionError); !ok { |
| 526 | t.Error("expected 'NotInTransitionError'") |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | func TestCancelAsyncTransition(t *testing.T) { |
| 531 | fsm := NewFSM( |
nothing calls this directly
no test coverage detected
searching dependent graphs…