27 references to Matches
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
EndpointHtmlRendererTest.cs (1)
1167var numMarkers = Regex.Matches(content, MarkerPrefix).Count;
Microsoft.Build.BuildCheck.UnitTests (10)
EndToEndTests.cs (10)
63Regex.Matches(output, "BC0201: .* Property").Count.ShouldBe(2); 64Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 65Regex.Matches(output, "BC0203 .* Property").Count.ShouldBe(2); 128Regex.Matches(output.LogOutput, expectedDiagnostic).Count.ShouldBe(2); 242Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2); 352Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 353Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(38); 357Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2); 358Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(42); 390Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2);
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)
788Regex.Matches(mockLogger.FullLog, $"{AssemblyMockCache}: GetCacheResultAsync for").Count.ShouldBe(graph.ProjectNodes.Count); 1643Regex.Matches(aString, substring).Count.ShouldBe(expectedOccurrences);
Microsoft.Build.Tasks.UnitTests (2)
PortableTasks_Tests.cs (1)
80Regex.Matches(executionOutput, @"Microsoft\.Build\.(\w+\.)+dll").Count.ShouldBeGreaterThan(1);
ResourceHandling\GenerateResource_Tests.cs (1)
3769var 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)
133var matches = Regex.Matches(message, @"\{\d+[}:]");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (1)
2689string[] 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)
207Assert.Single(Regex.Matches(content, escapedPkgRef)); 209Assert.Single(Regex.Matches(content, escapedApiRef));
OpenApiAddURLTests.cs (2)
412Assert.Single(Regex.Matches(content, escapedPkgRef)); 414Assert.Single(Regex.Matches(content, escapedApiRef));
Microsoft.Maui.Controls (1)
WebView\WebView.cs (1)
299 var singleQuotes = Regex.Matches(js, @"(\\*?)'");