Skip to content

Commit

Permalink
setters tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GRbit committed Mar 9, 2023
1 parent c9ebcc9 commit fae8e68
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,31 @@ func TestClientNewRequest(t *testing.T) {
assertNotNil(t, request)
}


func TestClientSetJSONMarshaler(t *testing.T) {
m := func (v interface{}) ([]byte, error) { return nil,nil }
c := New().SetJSONMarshaler(m)
assertEqual(t, m, c.JSONMarshal)
}

func TestClientSetJSONUnmarshaler(t *testing.T) {
m := func ([]byte, interface{}) error { return nil }
c := New().SetJSONUnmarshaler(m)
assertEqual(t, m, c.JSONUnmarshal)
}

func TestClientSetXMLMarshaler(t *testing.T) {
m := func (v interface{}) ([]byte, error) { return nil,nil }
c := New().SetXMLMarshaler(m)
assertEqual(t, m, c.XMLMarshal)
}

func TestClientSetXMLUnmarshaler(t *testing.T) {
m := func ([]byte, interface{}) error { return nil }
c := New().SetXMLUnmarshaler(m)
assertEqual(t, m, c.XMLUnmarshal)
}

func TestDebugBodySizeLimit(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()
Expand Down

0 comments on commit fae8e68

Please sign in to comment.