diff --git a/machine_test.go b/machine_test.go index f3c5637..fd5873b 100644 --- a/machine_test.go +++ b/machine_test.go @@ -60,8 +60,8 @@ func TestMachineAddSubscription(t *testing.T) { assert.Nil(t, s.Trigger("connect")) exitMessage := <-*x.(*EventChannel) enterMessage := <-*x.(*EventChannel) - if exitMessage.on == EXITSTATEEVENT && exitMessage.source == "disconnected" { - if enterMessage.on == ENTERSTATEEVENT && enterMessage.dest == "start_connection" { + if exitMessage.On == EXITSTATEEVENT && exitMessage.Source == "disconnected" { + if enterMessage.On == ENTERSTATEEVENT && enterMessage.Dest == "start_connection" { return } } diff --git a/transition_test.go b/transition_test.go index 78f7b85..ce3b0d5 100644 --- a/transition_test.go +++ b/transition_test.go @@ -46,10 +46,10 @@ func TestTransitionSubscribe(t *testing.T) { assert.Nil(t, s.Run(m)) exitEvent := <-*c.(*EventChannel) enterEvent := <-*c.(*EventChannel) - if exitEvent.on != EXITSTATEEVENT { + if exitEvent.On != EXITSTATEEVENT { t.Errorf("Invalid exit event") } - if enterEvent.on != ENTERSTATEEVENT { + if enterEvent.On != ENTERSTATEEVENT { t.Errorf("Invalid enter event") } }