CommandRecorderSpy is a test double for ghtelemetry.CommandRecorder. It captures recorded events and the most recent SetSampleRate call so tests can assert on the sampling behavior commands attempt to configure.
| 18 | // It captures recorded events and the most recent SetSampleRate call so tests can |
| 19 | // assert on the sampling behavior commands attempt to configure. |
| 20 | type CommandRecorderSpy struct { |
| 21 | Events []ghtelemetry.Event |
| 22 | LastSampleRate int |
| 23 | } |
| 24 | |
| 25 | func (r *CommandRecorderSpy) Record(event ghtelemetry.Event) { |
| 26 | r.Events = append(r.Events, event) |
nothing calls this directly
no outgoing calls
no test coverage detected