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

Commit f380287

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 f380287

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,8 @@ 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(fileName,
602+
@"\d{8}_\d{6}\.\d{7}$",
603603
$"Filename should end with yyyyMMdd_HHmmss.fffffff pattern: {fileName}");
604604
}
605605

0 commit comments

Comments
 (0)