MCPcopy
hub / github.com/looplab/fsm / TestAsyncTransitionNotInProgress

Function TestAsyncTransitionNotInProgress

fsm_test.go:515–528  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

513}
514
515func 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
530func TestCancelAsyncTransition(t *testing.T) {
531 fsm := NewFSM(

Callers

nothing calls this directly

Calls 3

TransitionMethod · 0.95
NewFSMFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…