324 references to Contains
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
Microsoft.Analyzers.Local.Tests (2)
CallAnalysis\UseThrowsTests.cs (2)
35Assert.Contains(ThrowHelpersClass + exception, d[0].GetMessage(), StringComparison.Ordinal); 283Assert.Contains(ThrowIfNullHelper, d[0].GetMessage(), StringComparison.Ordinal);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (7)
DataProtectionProviderTests.cs (7)
42Assert.Contains("Warning: the key below is in an unencrypted form.", fileText, StringComparison.Ordinal); 81Assert.Contains("This key is encrypted with Windows DPAPI.", fileText, StringComparison.Ordinal); 85Assert.Contains("Warning: the key below is in an unencrypted form.", fileText, StringComparison.Ordinal); 112Assert.Contains("Windows DPAPI", fileText, StringComparison.Ordinal); 158Assert.Contains("X509Certificate", fileText, StringComparison.Ordinal); 238Assert.Contains("X509Certificate", fileText, StringComparison.Ordinal); 309Assert.Contains("X509Certificate", fileText, StringComparison.Ordinal);
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
BasicTests.cs (1)
343Assert.Contains(expectedLink, responseData, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Rendering\HtmlHelperTextAreaTest.cs (1)
23Assert.Contains(@"placeholder=""HtmlEncode[[placeholder]]""", result, StringComparison.Ordinal);
Rendering\HtmlHelperTextBoxTest.cs (1)
29Assert.Contains(@"placeholder=""HtmlEncode[[placeholder]]""", result, StringComparison.Ordinal);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
ServerTests.cs (1)
84Assert.Contains(address, netshOutput, StringComparison.OrdinalIgnoreCase);
Microsoft.Build.Engine.UnitTests (2)
BackEnd\BuildManager_Tests.cs (1)
3908Assert.Contains("The target \"Foo\" does not exist in the project", _logger.FullLog,
TypeLoader_Tests.cs (1)
218Assert.Contains(successfulMessage, scriptOutput, StringComparison.OrdinalIgnoreCase);
Microsoft.Build.Utilities.UnitTests (1)
MockEngine.cs (1)
98internal void AssertLogContains(string contains) => Assert.Contains(contains, Log, StringComparison.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (259)
CommandLineTests.cs (259)
3002Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", outWriter.ToString(), StringComparison.Ordinal); 3013Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", outWriter.ToString(), StringComparison.Ordinal); 5932Assert.Contains("error CS7061: Duplicate 'CompilationRelaxationsAttribute' attribute in", outWriter.ToString(), StringComparison.Ordinal); 7253Assert.Contains("error CS2021: File name", message, StringComparison.Ordinal); 7254Assert.Contains("sub", message, StringComparison.Ordinal); 7281Assert.Contains("error CS2021: File name", message, StringComparison.Ordinal); 7282Assert.Contains("sub", message, StringComparison.Ordinal); 7308Assert.Contains(@"error CS2021: File name 'aaa:\a.exe' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long", outWriter.ToString(), StringComparison.Ordinal); 7334Assert.Contains("error CS2005: Missing file specification for '/out:' option", outWriter.ToString(), StringComparison.Ordinal); 7871Assert.Contains("error CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7878Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7885Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7892Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7918Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7926Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7952Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7960Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7986Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7994Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 8406Assert.Contains(fileName + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8415Assert.Contains(fileName + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8425Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8434Assert.Contains(source + @"(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8443Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8452Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 9450Assert.Contains(CodeAnalysisResources.AnalyzerExecutionTimeColumnHeader, output, StringComparison.Ordinal); 9451Assert.Contains($"{nameof(WarningDiagnosticAnalyzer)} (Warning01)", output, StringComparison.Ordinal); 9452Assert.Contains($"{nameof(DiagnosticSuppressorForId)} (Suppressor01)", output, StringComparison.Ordinal); 9453Assert.Contains(CodeAnalysisResources.GeneratorNameColumnHeader, output, StringComparison.Ordinal); 9454Assert.Contains(typeof(DoNothingGenerator).FullName, output, StringComparison.Ordinal); 9550Assert.Contains(CodeAnalysisResources.AnalyzerExecutionTimeColumnHeader, output, StringComparison.Ordinal); 9551Assert.Contains(new WarningDiagnosticAnalyzer().ToString(), output, StringComparison.Ordinal); 9600Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.Id, output, StringComparison.Ordinal); 9603Assert.Contains(AnalyzerExecutor.AnalyzerExceptionDiagnosticId, output, StringComparison.Ordinal); 9604Assert.Contains(nameof(NotImplementedException), output, StringComparison.Ordinal); 9625Assert.Contains(AnalyzerExecutor.AnalyzerExceptionDiagnosticId, output, StringComparison.Ordinal); 9626Assert.Contains(nameof(NotImplementedException), output, StringComparison.Ordinal); 9647Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.Id, output, StringComparison.Ordinal); 9648Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.MessageFormat.ToString(CultureInfo.InvariantCulture), output, StringComparison.Ordinal); 9692Assert.Contains("CS2006", outWriter.ToString(), StringComparison.Ordinal); 9697Assert.Contains("CS2006", outWriter.ToString(), StringComparison.Ordinal); 9702Assert.Contains("CS2038", outWriter.ToString(), StringComparison.Ordinal); 9707Assert.Contains("CS2038", outWriter.ToString(), StringComparison.Ordinal); 9734Assert.Contains("CS2021", outWriter.ToString(), StringComparison.Ordinal); 9841Assert.Contains("error CS0006: Metadata file 'com2.dll' could not be found", outWriter.ToString(), StringComparison.Ordinal); 9847Assert.Contains("error CS0006: Metadata file '..\\lpt8.dll' could not be found", outWriter.ToString(), StringComparison.Ordinal); 9853Assert.Contains("warning CS1668: Invalid search path 'aux' specified in '/LIB option' -- 'directory does not exist'", outWriter.ToString(), StringComparison.Ordinal); 10015Assert.Contains(errorMessage, output, StringComparison.Ordinal); 10645Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10657Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10661Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10682Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10690Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10698Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10702Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10703Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10707Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10711Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10715Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10719Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10723Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10735Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10739Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10740Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10744Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10745Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10749Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10753Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10761Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10769Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10773Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10794Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10796Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10803Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10808Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10812Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10814Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10818Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10819Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10823Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10825Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10829Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10833Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10837Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10841Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10851Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10853Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10857Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10858Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10862Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10863Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10868Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10873Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10877Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10881Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10883Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10888Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10892Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10894Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10898Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10900Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10947Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10948Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10949Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10957Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10961Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10962Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10963Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10967Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10968Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10972Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10973Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10977Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10978Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10979Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10983Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10984Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10985Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10990Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10991Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10992Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10996Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10997Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10998Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11002Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11003Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11004Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11020Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11024Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11028Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11032Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11054Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11058Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11059Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11060Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11064Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11065Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11066Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11070Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11071Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11072Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11076Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11080Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11081Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11082Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11086Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11087Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11088Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11092Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11093Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11094Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11098Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11102Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11106Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11107Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11108Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11112Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11113Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11114Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11133Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11134Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11138Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11142Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11146Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11150Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11154Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11158Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11162Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11166Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11170Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11174Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11178Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11181Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11184Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11185Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11189Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11190Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11193Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11194Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11197Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11198Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11268Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11272Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11276Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11279Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11283Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11286Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11289Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11293Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11296Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11299Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11302Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 12513Assert.Contains("error CS8101: The pathmap option was incorrectly formatted.", outWriter.ToString(), StringComparison.Ordinal); 12533Assert.Contains("error CS2021: File name 'test\\?.pdb' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long", outWriter.ToString(), StringComparison.Ordinal); 12556Assert.Contains("warning CS0078", output, StringComparison.Ordinal); 12561Assert.Contains("error CS0078", output, StringComparison.Ordinal); 12580Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12581Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12608Assert.Contains("warning CS1522", output, StringComparison.Ordinal); 12624Assert.Contains($"info SP0001", output, StringComparison.Ordinal); 12625Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12630Assert.Contains("error CS1522", output, StringComparison.Ordinal); 12642Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12643Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12664Assert.Contains("warning CS0169", output, StringComparison.Ordinal); 12680Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12681Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12686Assert.Contains("error CS0169", output, StringComparison.Ordinal); 12698Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12699Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12762Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12763Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12764Assert.Contains("error CS1001", output, StringComparison.Ordinal); 12784Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12785Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12786Assert.Contains("error CS1001", output, StringComparison.Ordinal); 12860Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12861Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12862Assert.Contains("error CS0180", output, StringComparison.Ordinal); 12885Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12886Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12887Assert.Contains("error CS0180", output, StringComparison.Ordinal); 12970Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12971Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12972Assert.Contains("error CS0122", output, StringComparison.Ordinal); 12995Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12996Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12997Assert.Contains("error CS0122", output, StringComparison.Ordinal); 13015Assert.Contains("error CS1001", output, StringComparison.Ordinal); 13020Assert.Contains("error CS1001", output, StringComparison.Ordinal); 13041Assert.Contains("error CS0246", output, StringComparison.Ordinal); 13046Assert.Contains("error CS0246", output, StringComparison.Ordinal); 13066Assert.Contains($"warning {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13085Assert.Contains("info SP0001", output, StringComparison.Ordinal); 13086Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 13093Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13103Assert.Contains("info SP0001", output, StringComparison.Ordinal); 13104Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 13113Assert.Contains($"warning {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13133Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13141Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13712Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13722Assert.Contains("warning CS8669", output, StringComparison.Ordinal); 13730Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13738Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13773Assert.Contains("warning AD0001: Analyzer 'Microsoft.CodeAnalysis.CommonDiagnosticAnalyzers+NamedTypeAnalyzerWithConfigurableEnabledByDefault' threw an exception of type 'System.NotImplementedException'", 13978Assert.Contains("warning Warning01", output, StringComparison.Ordinal); 13979Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 13983Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 14969Assert.Contains("MultipleGlobalAnalyzerKeys:", output, StringComparison.Ordinal); 14970Assert.Contains("'option1'", output, StringComparison.Ordinal); 14971Assert.Contains("'Global Section'", output, StringComparison.Ordinal); 14988Assert.Contains("MultipleGlobalAnalyzerKeys:", output, StringComparison.Ordinal); 14989Assert.Contains("'option1'", output, StringComparison.Ordinal); 14990Assert.Contains("'/file.cs'", output, StringComparison.Ordinal); 15225Assert.Contains("b.txt(1,3): warning ID0001", output, StringComparison.Ordinal); 15478Assert.Contains("warning CS8034", output, StringComparison.Ordinal); 15485Assert.Contains("error CS8034", output, StringComparison.Ordinal); 15502Assert.Contains("warning CS8034", output, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
CodeActions\PreviewTests.cs (2)
129Assert.Contains(s_removedMetadataReferenceDisplayName, text, StringComparison.Ordinal); 136Assert.Contains(AddedProjectName, text, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenIterators.cs (2)
1942Assert.Contains("System.Environment.CurrentManagedThreadId.get", il, StringComparison.Ordinal); 1975Assert.Contains("System.Environment.CurrentManagedThreadId.get", il, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
LexicalAndXml\PreprocessorTests.cs (1)
3558Assert.Contains("100", diagnostics.First().ToString(), StringComparison.Ordinal); // one-based line number
Parsing\DeclarationParsingTests.cs (1)
5894Assert.Contains(desiredText, stmtText, StringComparison.Ordinal);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
NavigateTo\AbstractNavigateToTests.cs (1)
182Assert.Contains(expectedItem.SecondarySort, actualItem.SecondarySort, StringComparison.Ordinal);
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\AssertEx.cs (1)
612Assert.Contains(expectedSubString, actualString, StringComparison.Ordinal);
Microsoft.CodeAnalysis.UnitTests (1)
CommonCommandLineParserTests.cs (1)
994Assert.Contains(string.Format(CodeAnalysisResources.InvalidRuleSetInclude, newFile.Path, string.Format(CodeAnalysisResources.RuleSetBadAttributeValue, "Action", "Default")), e.Message, StringComparison.Ordinal);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
VisualStudioMSBuildWorkspaceTests.cs (4)
2354Assert.Contains("Window", text.ToString(), StringComparison.Ordinal); 2372Assert.Contains("public class CSharpClass", documentText.ToString(), StringComparison.Ordinal); 2376Assert.Contains("Window", additionalDocumentText.ToString(), StringComparison.Ordinal); 2395Assert.Contains("Window", atext.ToString(), StringComparison.Ordinal);
Microsoft.DotNet.XUnitAssert.Tests (1)
StringAssertsTests.cs (1)
133 Assert.Contains("WORLD", "Hello, world!", StringComparison.OrdinalIgnoreCase);
Microsoft.Extensions.ApiDescription.Client.Tests (3)
GetOpenApiReferenceMetadataTest.cs (3)
282Assert.Contains(error1, buildEngine.Log, StringComparison.OrdinalIgnoreCase); 283Assert.Contains(error2, buildEngine.Log, StringComparison.OrdinalIgnoreCase); 328Assert.Contains(error, buildEngine.Log, StringComparison.OrdinalIgnoreCase);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
ResourceMonitoringServiceTests.cs (2)
264Assert.Contains(ProviderUnableToGatherData, logger.Collector.LatestRecord.Message, StringComparison.OrdinalIgnoreCase); 292Assert.Contains(_publisherUnableToPublishErrorMessage, logger.Collector.LatestRecord.Message, StringComparison.OrdinalIgnoreCase);
Microsoft.ML.Tests (1)
CachingTests.cs (1)
68Assert.Contains("Current estimator chain has no estimator, can't append cache checkpoint.", ex.Message,
Shared.Tests (7)
Throw\ThrowTest.cs (7)
21Assert.Contains(message, exception.Message, StringComparison.Ordinal); 32Assert.Contains(message, exception.Message, StringComparison.Ordinal); 42Assert.Contains(message, exception.Message, StringComparison.Ordinal); 55Assert.Contains(message, exception.Message, StringComparison.Ordinal); 74Assert.Contains(message, exception.Message, StringComparison.Ordinal); 92Assert.Contains(message, exception.Message, StringComparison.Ordinal); 104Assert.Contains(message, exception.Message, StringComparison.Ordinal);
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
303Assert.Contains(substring, value, StringComparison.Ordinal);
System.Windows.Forms.Tests (3)
System\Windows\Forms\RichTextBoxTests.cs (3)
10557Assert.Contains("RICHEDIT50W", GetClassName(control.HWND), StringComparison.Ordinal); 10566Assert.Contains(".RichEdit.", GetClassName(riched32.HWND), StringComparison.Ordinal); 10571Assert.Contains(".RichEdit20W.", GetClassName(riched20.HWND), StringComparison.Ordinal);
VBCSCompiler.UnitTests (15)
CompilerServerTests.cs (15)
556Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 557Assert.Contains("hello.cs(5,42): error CS1002: ; expected", result.Output, StringComparison.Ordinal); 585Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 586Assert.Contains("hellovb.vb(3) : error BC30625: 'Module' statement must end with a matching 'End Module'.", result.Output, StringComparison.Ordinal); 587Assert.Contains("hellovb.vb(7) : error BC30460: 'End Class' must be preceded by a matching 'Class'.", result.Output, StringComparison.Ordinal); 603Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 604Assert.Contains("error CS2001: Source file", result.Output, StringComparison.Ordinal); 621Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 622Assert.Contains("error CS0006: Metadata file", result.Output, StringComparison.Ordinal); 646Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 647Assert.Contains("error CS0009: Metadata file", result.Output, StringComparison.Ordinal); 664Assert.Contains("Copyright (C) Microsoft Corporation. All rights reserved.", result.Output, StringComparison.Ordinal); 665Assert.Contains("error BC2001", result.Output, StringComparison.Ordinal); 694Assert.Contains("error BC2017: could not find library", result.Output, StringComparison.Ordinal); 723Assert.Contains("error BC31519", result.Output, StringComparison.Ordinal);
xunit.assert (1)
StringAsserts.cs (1)
45 Contains(expectedSubstring, actualString, StringComparison.CurrentCulture);