gotdd/di_test.go

19 lines
241 B
Go
Raw Normal View History

2022-01-20 04:20:12 +00:00
package main
import (
"bytes"
"testing"
)
func TestGreet(t *testing.T) {
buffer := bytes.Buffer{}
Greet(&buffer, "Chris")
got := buffer.String()
want := "Hello, Chris"
if got != want {
t.Errorf("got %q want %q", got, want)
}
}