1 package publishserviceapi
6 "github.com/stretchr/testify/assert"
9 func TestValidate(t *testing.T) {
10 serviceDescriptionUnderTest := ServiceAPIDescription{}
11 err := serviceDescriptionUnderTest.Validate()
12 if assert.Error(t, err) {
13 assert.Contains(t, err.Error(), "missing")
14 assert.Contains(t, err.Error(), "apiName")
17 serviceDescriptionUnderTest.ApiName = "apiName"
18 err = serviceDescriptionUnderTest.Validate()