public void UseTraceSink_OnCastingError_ThrowsException() { Action action = () => TelemetryConfigurationExtensions.UseTraceSink(Mock.Of <IBigBrother>()); action.Should().Throw <InvalidOperationException>() .WithMessage("Couldn't cast this instance of *IBigBrother to a concrete implementation of *BigBrother"); }
public void UseTraceSink_OnSuccess_ReturnsTraceSink() { TelemetryConfigurationExtensions.UseTraceSink(_mockBb.Object) .Should().BeOfType <TraceSink>() .Which.Bb.Should().Be(_mockBb.Object); }