18 lines
457 B
Go
18 lines
457 B
Go
package displaycontroller
|
|
|
|
import "testing"
|
|
|
|
func TestNew_initialState(t *testing.T) {
|
|
c := New(":0", "test-screen", nil)
|
|
if got := c.State(); got != "unknown" {
|
|
t.Fatalf("initial state = %q, want %q", got, "unknown")
|
|
}
|
|
}
|
|
|
|
func TestExecute_unknownAction(t *testing.T) {
|
|
c := New(":0", "test-screen", nil)
|
|
c.Execute("invalid_action")
|
|
if got := c.State(); got != "unknown" {
|
|
t.Fatalf("state after unknown action = %q, want %q", got, "unknown")
|
|
}
|
|
}
|