59 references to Matches
Aspire.Dashboard.Tests (1)
Markdown\MarkdownProcessorTests.cs (1)
49var count = Regex.Matches(html, Regex.Escape("code-block")).Count;
dotnet.Tests (16)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (15)
34MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration)); 35MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("OtherTestProject", TestingConstants.Passed, useCurrentVersion: true, configuration)); 37MatchCollection skippedTestsMatches = Regex.Matches(result.StdOut!, "skipped Test2"); 38MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed Test3"); 74MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration)); 75MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: true, configuration)); 76MatchCollection currentDotnetOtherProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("OtherTestProject", TestingConstants.Passed, useCurrentVersion: true, configuration)); 78MatchCollection skippedTestsMatches = Regex.Matches(result.StdOut!, "skipped Test1"); 79MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed Test2"); 80MatchCollection timeoutTestsMatches = Regex.Matches(result.StdOut!, @"failed \(canceled\) Test3"); 81MatchCollection errorTestsMatches = Regex.Matches(result.StdOut!, "failed Test4"); 82MatchCollection canceledTestsMatches = Regex.Matches(result.StdOut!, @"failed \(canceled\) Test5"); 190MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration)); 191MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: true, configuration)); 193MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed TestMethod3");
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (1)
32Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", true, configuration, "exec", addVersionAndArchPattern: false));
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (11)
UserJwtsTests.cs (11)
167var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 201var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 219var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 382var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 401var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 421var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 442var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 564var matches = Regex.Matches(_console.GetOutput(), "New JWT saved with ID '(.*?)'"); 657var printMatches = Regex.Matches(_console.GetOutput(), "Signing Key: '(.*?)'"); 662var resetMatches = Regex.Matches(_console.GetOutput(), "New signing key created: '(.*?)'"); 683var printMatches = Regex.Matches(_console.GetOutput(), "Signing Key: '(.*?)'");
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
EndpointHtmlRendererTest.cs (1)
1311var numMarkers = Regex.Matches(content, MarkerPrefix).Count;
Microsoft.Build.BuildCheck.UnitTests (11)
EndToEndTests.cs (11)
65Regex.Matches(output, "BC0201: .* Property").Count.ShouldBe(2); 66Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 67Regex.Matches(output, "BC0203 .* Property").Count.ShouldBe(2); 130Regex.Matches(output.LogOutput, expectedDiagnostic).Count.ShouldBe(2); 244Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2); 354Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 355Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(38); 359Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 360Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(42); 396Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2); 474Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(expectCheckTrigger ? 2 : 0);
Microsoft.Build.Engine.OM.UnitTests (1)
Construction\WhiteSpacePreservation_Tests.cs (1)
507var nlCount = Regex.Matches(projectResults, @"\n").Count;
Microsoft.Build.Engine.UnitTests (4)
Graph\ProjectGraph_Tests.cs (2)
1873Regex.Matches(dot, "->").Count.ShouldBe(edgeCount); 1876Regex.Matches(dot, "label").Count.ShouldBe(graph.ProjectNodes.Count);
ProjectCache\ProjectCacheTests.cs (2)
807Regex.Matches(mockLogger.FullLog, $"{AssemblyMockCache}: GetCacheResultAsync for").Count.ShouldBe(graph.ProjectNodes.Count); 1662Regex.Matches(aString, substring).Count.ShouldBe(expectedOccurrences);
Microsoft.Build.Tasks.UnitTests (2)
PortableTasks_Tests.cs (1)
79Regex.Matches(executionOutput, @"Microsoft\.Build\.(\w+\.)+dll").Count.ShouldBeGreaterThan(1);
ResourceHandling\GenerateResource_Tests.cs (1)
3767var matches = Regex.Matches(unformattedMessage, @"\{\d+.*?\}");
Microsoft.Build.UnitTests.Shared (1)
MockLogger.cs (1)
558var matches = Regex.Matches(FullLog, regexSearch ? message : Regex.Escape(message));
Microsoft.CodeAnalysis (1)
Diagnostic\DiagnosticInfo.cs (1)
134var matches = Regex.Matches(message, @"\{\d+[}:]");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (1)
2612string[] actual = Regex.Matches(il, @"\.class nested assembly explicit ansi sealed '([^']*?)'").Cast<Match>().Select(m => m.Groups[1].Value).ToArray();
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticDescription.cs (1)
468if (Regex.Matches(messageFormat, @"\{\d+(:\d+)?\}") is { Count: > 0 } matches)
Microsoft.DotNet.Open.Api.Tools.Tests (4)
OpenApiAddFileTests.cs (2)
210Assert.Single(Regex.Matches(content, escapedPkgRef)); 212Assert.Single(Regex.Matches(content, escapedApiRef));
OpenApiAddURLTests.cs (2)
416Assert.Single(Regex.Matches(content, escapedPkgRef)); 418Assert.Single(Regex.Matches(content, escapedApiRef));
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIAssistantChatClientIntegrationTests.cs (1)
86var matches = Regex.Matches(listing, @"thread_\w+");
Microsoft.Maui.Controls (1)
WebView\WebView.cs (1)
302 var singleQuotes = Regex.Matches(js, @"(\\*?)'");
QuarantineTools.Tests (2)
QuarantineScriptTests.cs (2)
67var count = Regex.Matches(updated, "QuarantinedTest").Count; 193var count = Regex.Matches(norm, "using Aspire.TestUtilities;").Count;