public void Receive_EmptyTracesIgnored() { var mockClient = new Mock <TraceServiceClient>(); var consumer = new GrpcTraceConsumer(mockClient.Object); consumer.Receive(new List <TraceProto>()); mockClient.Verify(c => c.PatchTraces(It.IsAny <string>(), It.IsAny <Traces>(), null), Times.Never()); }
public void Receive() { Traces traces = GetTraces(); var mockClient = new Mock <TraceServiceClient>(); mockClient.Setup(c => c.PatchTraces(ProjectId, traces, null)); var consumer = new GrpcTraceConsumer(mockClient.Object); consumer.Receive(traces.Traces_); mockClient.VerifyAll(); }