Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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();
        }