blob: 67dfb9e5d3955c03058d0dc4a892ad8d0b388c1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package navitia_api_client
import (
"reflect"
"testing"
"github.com/stretchr/testify/require"
)
func requireErrorTypeMatch(t *testing.T, err error, expected error) {
require.Equalf(t, reflect.TypeOf(err), reflect.TypeOf(expected), "Invalid error type. Got %s but expected %s", reflect.TypeOf(err), reflect.TypeOf(expected))
}
func TestErrorsCoverage(t *testing.T) {
apiErr := ApiError{}
_ = apiErr.Error()
httpClientErr := HttpClientError{}
_ = httpClientErr.Error()
_ = httpClientErr.Unwrap()
jsonDecodeErr := JsonDecodeError{}
_ = jsonDecodeErr.Error()
_ = jsonDecodeErr.Unwrap()
dateParsingErr := DateParsingError{}
_ = dateParsingErr.Error()
_ = dateParsingErr.Unwrap()
}
|