Sitelet https://github.com/microsoft/vstest/commit/0ef0f8b6bd7ad1025997c41e55eb74822eb9d19c
Skip to content

Commit 0ef0f8b

Browse files
nohwndCopilot
andcommitted
Fix MSTEST0046: use Assert.MatchesRegex instead of StringAssert.Matches
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5f5c888 commit 0ef0f8b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests/HtmlLoggerTests.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ public void XmlFilePathShouldContainFractionalSecondsForCrossProcessUniqueness()
598598

599599
// The filename should contain a fractional-seconds timestamp: yyyyMMdd_HHmmss.fffffff
600600
// e.g., TestResult_user_MACHINE_20260324_065512.1234567
601-
StringAssert.Matches(fileName, new System.Text.RegularExpressions.Regex(
602-
@"\d{8}_\d{6}\.\d{7}$"),
601+
Assert.MatchesRegex(
602+
@"\d{8}_\d{6}\.\d{7}$",
603+
fileName,
603604
$"Filename should end with yyyyMMdd_HHmmss.fffffff pattern: {fileName}");
604605
}
605606

0 commit comments

Comments
 (0)