Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • Adds xUnit test project CodingWithCalvin.Otel4Vsix.Tests with 157 unit tests
  • Adds InternalsVisibleTo attribute to expose internal classes to tests
  • Updates solution file to include test project

Test Coverage

Test Class Tests Coverage
TelemetryConfigurationTests 20 Defaults, validation, property setters
ActivitySourceProviderTests 17 Constructor, disposal, activity creation
MetricsProviderTests 17 Constructor, disposal, instrument caching
LoggerProviderTests 27 Constructor, disposal, logging delegation
ExceptionTrackerTests 29 Exception tracking, filtering, activities
VsixTelemetryTests 47 Static facade initialization/shutdown

Dependencies Added

  • xUnit 2.6.2
  • xunit.runner.visualstudio 2.5.4
  • Microsoft.NET.Test.Sdk 17.8.0
  • Moq 4.20.70
  • FluentAssertions 6.12.0

Test plan

  • All 157 tests pass locally
  • CI build passes

Add unit test project with 157 tests covering:
- TelemetryConfiguration validation and defaults
- ActivitySourceProvider creation and disposal
- MetricsProvider instrument caching
- LoggerProvider delegation
- ExceptionTracker filtering and tracking
- VsixTelemetry static facade lifecycle
@CalvinAllen CalvinAllen merged commit 8211b37 into main Dec 23, 2025
3 checks passed
@CalvinAllen CalvinAllen deleted the test/add-unit-tests branch December 23, 2025 17:58
CalvinAllen added a commit that referenced this pull request Dec 23, 2025
Add unit test project with 157 tests covering:
- TelemetryConfiguration validation and defaults
- ActivitySourceProvider creation and disposal
- MetricsProvider instrument caching
- LoggerProvider delegation
- ExceptionTracker filtering and tracking
- VsixTelemetry static facade lifecycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants