Table of Contents

Class OpenTelemetryTests

Namespace
ProjectTemplate.Web.Tests
Assembly
ProjectTemplate.Web.Tests.dll

Provides integration and configuration tests for the application OpenTelemetry foundation.

public sealed class OpenTelemetryTests
Inheritance
OpenTelemetryTests
Inherited Members

Methods

Application_Starts_WhenOpenTelemetryDisabled()

Verifies that the application starts when OpenTelemetry is disabled.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/OpenTelemetryTests.cs", 118)]
public Task Application_Starts_WhenOpenTelemetryDisabled()

Returns

Task

A task that represents the asynchronous test operation.

Application_Starts_WhenOpenTelemetryEnabledWithoutOtlpExporter()

Verifies that the application starts when OpenTelemetry is enabled and OTLP export is disabled.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/OpenTelemetryTests.cs", 90)]
public Task Application_Starts_WhenOpenTelemetryEnabledWithoutOtlpExporter()

Returns

Task

A task that represents the asynchronous test operation.

OpenTelemetryOptions_Bind_DefaultConfiguration()

Verifies that application OpenTelemetry options are bound from configuration.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/OpenTelemetryTests.cs", 24)]
public void OpenTelemetryOptions_Bind_DefaultConfiguration()

OpenTelemetryOptions_InvalidOtlpEndpoint_FailsValidationWhenExporterEnabled()

Verifies that OpenTelemetry options validation fails when OTLP export is enabled with an invalid endpoint.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/OpenTelemetryTests.cs", 61)]
public void OpenTelemetryOptions_InvalidOtlpEndpoint_FailsValidationWhenExporterEnabled()