コード例 #1
0
        public void UseEventSourceSink_OnCastingError_ThrowsException()
        {
            Action action = () => TelemetryConfigurationExtensions.UseEventSourceSink(Mock.Of <IBigBrother>());

            action.Should().Throw <InvalidOperationException>()
            .WithMessage("Couldn't cast this instance of *IBigBrother to a concrete implementation of *BigBrother");
        }
コード例 #2
0
 public void UseEventSourceSink_OnSuccess_ReturnsEventSink()
 {
     TelemetryConfigurationExtensions.UseEventSourceSink(_mockBb.Object)
     .Should().BeOfType <EventSourceSink>()
     .Which.Bb.Should().Be(_mockBb.Object);
 }