add test for multiple return values

This commit is contained in:
Joel Wetzell
2026-03-17 19:33:41 -05:00
parent 1467d9de16
commit 2a40fa561c
2 changed files with 12 additions and 1 deletions

View File

@@ -44,6 +44,10 @@ func (t TestStruct) GetIntSlice() []int {
func (t TestStruct) Void() {}
func (t TestStruct) MultipleReturnValues() (string, int) {
return t.String, t.Int
}
type TestProcessor struct {
}

View File

@@ -106,8 +106,15 @@ func TestGoodStructMethodGet(t *testing.T) {
payload: TestStruct{IntSlice: []int{1, 2, 3}},
expected: []int{1, 2, 3},
},
{
name: "multiple return values",
params: map[string]any{
"name": "MultipleReturnValues",
},
payload: TestStruct{String: "hello", Int: 42},
expected: []any{"hello", 42},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
registration, ok := processor.ProcessorRegistry["struct.method.get"]