Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Implements test coverage for the timezone logic introduced in commit 2d93bbc, which handles German time (Europe/Berlin) for date parameters in station board and train connection queries.

Test coverage added:

  • User-provided dates: Validates dates are used directly without conversion (German time assumed)
  • Auto-generated dates: Confirms UTC→Europe/Berlin conversion when no date provided
  • Fallback behavior: Tests DateTime.Now fallback when timezone lookup fails
  • Consistency across calls: Verifies timezone logic remains consistent with mixed call patterns

Example test:

[Fact]
public async Task GetStationBoardAsync_WithProvidedDate_UsesDateDirectlyWithoutTimezoneConversion()
{
    var germanTime = new DateTime(2025, 11, 6, 14, 30, 0);
    await service.GetStationBoardAsync(evaNo, germanTime);
    
    // Verifies path contains exact provided date without conversion
    Assert.Contains("plan/8000105/251106/14", capturedPath);
}

All 46 tests passing (5 new timezone tests added).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove UTC timezone and use German local time Add comprehensive tests for timezone handling in station board queries Nov 6, 2025
Copilot AI requested a review from abeckDev November 6, 2025 15:09
@abeckDev abeckDev marked this pull request as ready for review November 6, 2025 15:12
@abeckDev abeckDev merged commit 200ed86 into feature/removeUtcTimezone Nov 6, 2025
@abeckDev abeckDev deleted the copilot/sub-pr-12 branch November 6, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants