github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/remote/response_status_code_test.go (about) 1 package remote 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestStatusCode_String(t *testing.T) { 10 assert := assert.New(t) 11 for i := 0; i < int(ResponseStatusCodeMAX); i++ { 12 code := ResponseStatusCode(i) 13 assert.NotEmpty(code.String()) 14 } 15 s := ResponseStatusCode(100).String() 16 assert.Equal(s, "ResponseStatusCode-100") 17 } 18 19 func TestStatusCode_Error(t *testing.T) { 20 assert := assert.New(t) 21 for i := 0; i < int(ResponseStatusCodeMAX); i++ { 22 var err error = nil 23 err = &ResponseError{ResponseStatusCode(i)} 24 assert.Error(err) 25 } 26 }