Skip to content

WeatherWorkerIntegrationTests

Namespace: IntegrationTests.WeatherWorker

Integration tests for the Weather Data Worker to verify coordinate management, InfluxDB operations,
API response parsing, and dependency resolution functionality.

public class WeatherWorkerIntegrationTests : IntegrationTests.Infrastructure.IntegrationTestBase

Inheritance ObjectIntegrationTestBaseWeatherWorkerIntegrationTests

Constructors

WeatherWorkerIntegrationTests()

public WeatherWorkerIntegrationTests()

Methods

Configuration_ContainsRequiredWeatherApiSettings()

Tests that the configuration system contains the required weather API settings and sections.

public void Configuration_ContainsRequiredWeatherApiSettings()

CoordinateRepo_GetLocation_ReturnsLocationByPostalCode()

Tests the coordinate repository's ability to retrieve location data by postal code or location name.

public Task CoordinateRepo_GetLocation_ReturnsLocationByPostalCode()

Returns

Task

CoordinateRepo_GetUnlockedLocation_ReturnsAvailableLocation()

Tests the coordinate repository's ability to retrieve unlocked locations for weather data collection.

public Task CoordinateRepo_GetUnlockedLocation_ReturnsAvailableLocation()

Returns

Task

HttpClientFactory_CanCreateHttpClient()

Tests the HTTP client factory's ability to create HTTP client instances for API communication.

public void HttpClientFactory_CanCreateHttpClient()

InfluxRepo_WriteOutsideWeatherData_DoesNotThrowException()

Tests the InfluxDB repository's ability to write weather data without throwing exceptions in test environment.

public Task InfluxRepo_WriteOutsideWeatherData_DoesNotThrowException()

Returns

Task

WeatherData_Properties_CanBeSetAndRetrieved()

Tests the WeatherData model's property assignment and retrieval functionality.

public void WeatherData_Properties_CanBeSetAndRetrieved()

Worker_CanParseBrightSkyApiResponse()

Tests JSON parsing functionality for Bright Sky API response format to extract temperature and timestamp data.

public void Worker_CanParseBrightSkyApiResponse()

Worker_CanParseMeteoApiResponse()

Tests JSON parsing functionality for Open-Meteo API response format to extract temperature and timestamp data.

public void Worker_CanParseMeteoApiResponse()

WorkerDependencies_CanBeResolved()

Tests that all required weather worker dependencies can be resolved from the dependency injection container.

public void WorkerDependencies_CanBeResolved()