(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestParamSelection_StringAndJSON(t *testing.T) { |
| 162 | cases := []struct { |
| 163 | value ParamSelection |
| 164 | expected string |
| 165 | }{ |
| 166 | {ParamSelect, "select"}, |
| 167 | {ParamMultiSelect, "multiselect"}, |
| 168 | {ParamSelection(250), "select"}, |
| 169 | } |
| 170 | |
| 171 | for _, tc := range cases { |
| 172 | t.Run(tc.expected, func(t *testing.T) { |
| 173 | assert.Equal(t, tc.expected, tc.value.String()) |
| 174 | data, err := json.Marshal(tc.value) |
| 175 | require.NoError(t, err) |
| 176 | assert.Equal(t, `"`+tc.expected+`"`, string(data)) |
| 177 | }) |
| 178 | } |
| 179 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…