(t *testing.T)
| 223 | } |
| 224 | |
| 225 | func TestMethodExprIsPayloadStreaming(t *testing.T) { |
| 226 | cases := map[string]struct { |
| 227 | stream expr.StreamKind |
| 228 | expected bool |
| 229 | }{ |
| 230 | "no stream": { |
| 231 | stream: expr.NoStreamKind, |
| 232 | expected: false, |
| 233 | }, |
| 234 | "client stream": { |
| 235 | stream: expr.ClientStreamKind, |
| 236 | expected: true, |
| 237 | }, |
| 238 | "server stream": { |
| 239 | stream: expr.ServerStreamKind, |
| 240 | expected: false, |
| 241 | }, |
| 242 | "BidirectionalStreamKind": { |
| 243 | stream: expr.BidirectionalStreamKind, |
| 244 | expected: true, |
| 245 | }, |
| 246 | } |
| 247 | for k, tc := range cases { |
| 248 | m := expr.MethodExpr{ |
| 249 | Stream: tc.stream, |
| 250 | } |
| 251 | if actual := m.IsPayloadStreaming(); actual != tc.expected { |
| 252 | t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | func TestMethodExprValidateInterceptors(t *testing.T) { |
| 258 | cases := []struct { |
nothing calls this directly
no test coverage detected