MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / TestAnyOfParameter

Function TestAnyOfParameter

internal/test/any_of/param/param_test.go:11–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestAnyOfParameter(t *testing.T) {
12 var p param.GetTestParams
13
14 p.Test = new(param.Test)
15 err := p.Test.FromTest0(param.Test0{
16 Item1: "foo",
17 Item2: "bar",
18 })
19 require.NoError(t, err)
20
21 hp, err := param.NewGetTestRequest("", &p)
22 assert.NoError(t, err)
23 assert.Equal(t, "/test?item1=foo&item2=bar", hp.URL.String())
24}
25
26func TestArrayOfAnyOfParameter(t *testing.T) {
27 var p param.GetTestParams

Callers

nothing calls this directly

Calls 3

NewGetTestRequestFunction · 0.92
FromTest0Method · 0.80
StringMethod · 0.45

Tested by

no test coverage detected