github.com/aavshr/aws-sdk-go@v1.41.3/private/model/api/shapetag_test.go (about) 1 //go:build 1.6 && codegen 2 // +build 1.6,codegen 3 4 package api_test 5 6 import ( 7 "testing" 8 9 "github.com/aavshr/aws-sdk-go/private/model/api" 10 ) 11 12 func TestShapeTagJoin(t *testing.T) { 13 s := api.ShapeTags{ 14 {Key: "location", Val: "query"}, 15 {Key: "locationName", Val: "abc"}, 16 {Key: "type", Val: "string"}, 17 } 18 19 expected := `location:"query" locationName:"abc" type:"string"` 20 21 o := s.Join(" ") 22 o2 := s.String() 23 if expected != o { 24 t.Errorf("Expected %s, but received %s", expected, o) 25 } 26 if expected != o2 { 27 t.Errorf("Expected %s, but received %s", expected, o2) 28 } 29 }