test(common): pin UnixTime module for Stryker mutation coverage - #243
Draft
ottobolyos wants to merge 1 commit into
Draft
test(common): pin UnixTime module for Stryker mutation coverage#243ottobolyos wants to merge 1 commit into
ottobolyos wants to merge 1 commit into
Conversation
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 20, 2026
…o-pr-249 (PR TrakHound#243 head on top of PR TrakHound#249)
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 20, 2026
… into integration/up-to-pr-243
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 21, 2026
… into integration/up-to-pr-243 Cascade rebuild after integration/up-to-pr-249 refresh — PR TrakHound#241 cycle-3 propagated through the queue-head merge; the PR TrakHound#243 test coverage addition merges cleanly onto the new int-249 tip because its diff touches disjoint UnixTime test files only.
ottobolyos
force-pushed
the
test/common-unixtime-mutation-coverage
branch
from
August 21, 2026 08:34
5fb6057 to
6d61d64
Compare
Adds 22 focused NUnit tests covering the UnixTime module (114 LOC, zero prior test references) — the first module targeted under the Stryker mutation-coverage-raising campaign for MTConnect.NET-Common (TrakHound#242). Coverage surface (every mutation-visible constant, branch, and arithmetic step): - EpochTime constant: year/month/day/hour/minute/second/Kind pinned. - EpochTicks constant: pinned against a BCL-computed epoch tick count and against the literal 621355968000000000. - ToUnixTime: epoch → 0, +/-1 tick boundaries, Utc arithmetic, Local-branch conversion via TimeZoneInfo (timezone-independent), Unspecified-treated-as-Utc semantics. - ToUnixUtcTime: Utc no-op, Local-branch conversion, default Utc assumption for Unspecified, explicit Utc/Local/Unspecified assumptions for the unspecifiedAssume argument (each arm hit). - ToUnixUTCTime: alias parity with ToUnixUtcTime for every Kind + assumption combination. - FromUnixTime: 0 → epoch, positive ticks, negative ticks. - ToDateTime (long extension): alias parity with FromUnixTime across 6 tick samples including both epoch offsets. - ToLocalDateTime: Kind=Local + instant-equality parity with FromUnixTime(t).ToLocalTime(). - Round-trip invariants: ToUnixTime ∘ FromUnixTime = identity on Utc across 5 spread instants (epoch, pre-epoch, y2000, contemporary, y2099); Unspecified round-trip preserves ticks with Kind normalising to Utc. - UnixDateTime.Now: bounded to a two-second window around BCL UtcNow (kills every constant-return and off-by-epoch mutant); two consecutive reads are monotone non-decreasing. Local-branch tests use TimeZoneInfo.ConvertTimeToUtc so the assertions hold in every timezone including UTC hosts. Refs TrakHound#242
ottobolyos
force-pushed
the
test/common-unixtime-mutation-coverage
branch
from
August 21, 2026 16:07
6d61d64 to
cb9222c
Compare
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 21, 2026
…tegration/up-to-pr-243
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 21, 2026
…tegration/up-to-pr-243
ottobolyos
added a commit
to ottobolyos/mtconnect.net
that referenced
this pull request
Aug 21, 2026
…tegration/up-to-pr-243
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #242 — first module targeted under the Stryker.NET mutation-coverage campaign for MTConnect.NET-Common. Adds a focused NUnit fixture that pins every mutation-visible constant, branch, and arithmetic step in the UnixTime module.
Zero production-code changes — test additions only.
Depends on
(no in-flight PR dependencies — merges cleanly against master or the head of the train.)