Skip to content

feat: implement mock PeriodicTimer in testing package#965

Merged
vbreuss merged 2 commits intomainfrom
topic/implement-periodic-timer-in-testing
Mar 13, 2026
Merged

feat: implement mock PeriodicTimer in testing package#965
vbreuss merged 2 commits intomainfrom
topic/implement-periodic-timer-in-testing

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented Mar 13, 2026

Adds PeriodicTimer support to the ITimeSystem abstraction by introducing a mock implementation in Testably.Abstractions.Testing, plus tests and API-surface updates to validate/lock in the new contract.

Key Changes:

  • Implement PeriodicTimerMock + PeriodicTimerFactoryMock and expose them via MockTimeSystem.PeriodicTimer (feature-flagged).
  • Add test coverage for PeriodicTimer factory and timer behavior under TimeSystemTests.
  • Update API expectation files and add the aweXpect.Chronology test dependency; adjust build/package config.

--

@vbreuss vbreuss self-assigned this Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 17:34
@vbreuss vbreuss added the enhancement New feature or request label Mar 13, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds PeriodicTimer support to the ITimeSystem abstraction by introducing a mock implementation in Testably.Abstractions.Testing, plus tests and API-surface updates to validate/lock in the new contract.

Changes:

  • Implement PeriodicTimerMock + PeriodicTimerFactoryMock and expose them via MockTimeSystem.PeriodicTimer (feature-flagged).
  • Add test coverage for PeriodicTimer factory and timer behavior under TimeSystemTests.
  • Update API expectation files and add the aweXpect.Chronology test dependency; adjust build/package config.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Tests/Testably.Abstractions.Tests/TimeSystem/PeriodicTimerTests.cs Adds behavior tests for IPeriodicTimer across time systems.
Tests/Testably.Abstractions.Tests/TimeSystem/PeriodicTimerFactoryTests.cs Adds validation + period propagation tests for the factory.
Tests/Testably.Abstractions.Testing.Tests/TimeSystem/PeriodicTimerFactoryMockTests.cs Ensures wrapping an existing PeriodicTimer is rejected in MockTimeSystem.
Tests/Directory.Build.props Adds aweXpect.Chronology reference for duration extensions in tests.
Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Testing_net8.0.txt Updates expected API surface (MockTimeSystem.PeriodicTimer).
Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Testing_net9.0.txt Updates expected API surface (MockTimeSystem.PeriodicTimer).
Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Testing_net10.0.txt Updates expected API surface (MockTimeSystem.PeriodicTimer).
Source/Testably.Abstractions.Testing/TimeSystem/PeriodicTimerMock.cs Implements mock IPeriodicTimer behavior.
Source/Testably.Abstractions.Testing/TimeSystem/PeriodicTimerFactoryMock.cs Implements mock IPeriodicTimerFactory for MockTimeSystem.
Source/Testably.Abstractions.Testing/MockTimeSystem.cs Wires PeriodicTimer factory into MockTimeSystem behind feature flag.
Source/Testably.Abstractions.Testing/Helpers/ExceptionFactory.cs Adds NotSupportedPeriodicTimerWrapping and minor formatting changes.
README.md Documents PeriodicTimer as a supported abstraction.
Pipeline/Build.cs Resets build scope to default.
Directory.Packages.props Adds aweXpect.Chronology version + bumps internal package versions.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 13, 2026

Test Results

    102 files  +    101      102 suites  +101   3h 4m 3s ⏱️ + 3h 4m 1s
112 447 tests +112 435   99 844 ✅ + 99 832  12 603 💤 +12 603  0 ❌ ±0 
267 786 runs  +267 774  231 288 ✅ +231 276  36 498 💤 +36 498  0 ❌ ±0 

Results for commit f1804f6. ± Comparison against base commit fd3a7ab.

♻️ This comment has been updated with latest results.

@sonarqubecloud
Copy link
Copy Markdown

@vbreuss vbreuss merged commit 4dd3b61 into main Mar 13, 2026
14 checks passed
@vbreuss vbreuss deleted the topic/implement-periodic-timer-in-testing branch March 13, 2026 20:15
@github-actions
Copy link
Copy Markdown

This is addressed in release v6.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request state: released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants