Ejemplo n.º 1
0
        public void SetPropertyFormat_WithCorrectStringFormat_Succeeds(string propertyFormat)
        {
            // Arrange
            var options = new ApplicationInsightsSinkExceptionOptions();

            // Act / Assert
            options.PropertyFormat = propertyFormat;
        }
Ejemplo n.º 2
0
        public void SetPropertyFormat_WithBlankValue_Fails(string propertyFormat)
        {
            // Arrange
            var options = new ApplicationInsightsSinkExceptionOptions();

            // Act / Assert
            Assert.Throws <ArgumentException>(() => options.PropertyFormat = propertyFormat);
        }
Ejemplo n.º 3
0
        public void SetPropertyFormat_WithInvalidStringFormat_Fails(string propertyFormat)
        {
            // Arrange
            var options = new ApplicationInsightsSinkExceptionOptions();

            // Act / Assert
            Assert.Throws <FormatException>(() => options.PropertyFormat = propertyFormat);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionTelemetryConverter" /> class.
 /// </summary>
 /// <param name="options">The consumer-configurable options to influence how the exception should be tracked.</param>
 /// <exception cref="ArgumentNullException">Thrown when the <paramref name="options"/> is <c>null</c>.</exception>
 public ExceptionTelemetryConverter(ApplicationInsightsSinkExceptionOptions options)
 {
     Guard.NotNull(options, nameof(options), "Requires a set of user-configurable options to influence the behavior of how exceptions are tracked");
     _options = options;
 }