(t *testing.T, msg *ConsumerMessage, expectedKey Encoder)
| 2151 | } |
| 2152 | |
| 2153 | func assertMessageKey(t *testing.T, msg *ConsumerMessage, expectedKey Encoder) { |
| 2154 | t.Helper() |
| 2155 | |
| 2156 | wantKey, _ := expectedKey.Encode() |
| 2157 | if !bytes.Equal(msg.Key, wantKey) { |
| 2158 | t.Fatalf("Incorrect key for message. expected=%s, actual=%s", expectedKey, msg.Key) |
| 2159 | } |
| 2160 | } |
| 2161 | |
| 2162 | func assertMessageValue(t *testing.T, msg *ConsumerMessage, expectedValue Encoder) { |
| 2163 | t.Helper() |
no test coverage detected