You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
423 B
Go
21 lines
423 B
Go
package internal
|
|
|
|
import (
|
|
"io"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"google.golang.org/grpc/codes"
|
|
"google.golang.org/grpc/status"
|
|
)
|
|
|
|
func TestEventHandler(t *testing.T) {
|
|
h := NewEventHandler(io.Discard, nil)
|
|
h.OnResolveMethod(nil)
|
|
h.OnSendHeaders(nil)
|
|
h.OnReceiveHeaders(nil)
|
|
h.OnReceiveTrailers(status.New(codes.OK, ""), nil)
|
|
assert.Equal(t, codes.OK, h.Status.Code())
|
|
h.OnReceiveResponse(nil)
|
|
}
|