327 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)
3001Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", outWriter.ToString(), StringComparison.Ordinal); 3012Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", outWriter.ToString(), StringComparison.Ordinal); 5902Assert.Contains("error CS7061: Duplicate 'CompilationRelaxationsAttribute' attribute in", outWriter.ToString(), StringComparison.Ordinal); 7223Assert.Contains("error CS2021: File name", message, StringComparison.Ordinal); 7224Assert.Contains("sub", message, StringComparison.Ordinal); 7251Assert.Contains("error CS2021: File name", message, StringComparison.Ordinal); 7252Assert.Contains("sub", message, StringComparison.Ordinal); 7278Assert.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); 7304Assert.Contains("error CS2005: Missing file specification for '/out:' option", outWriter.ToString(), StringComparison.Ordinal); 7841Assert.Contains("error CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7848Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7855Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7862Assert.Contains("warning CS0168: The variable 'x' is declared but never used\r\n", outWriter.ToString(), StringComparison.Ordinal); 7888Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7896Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7922Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7930Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7956Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 7964Assert.Contains("warning CS2023: Ignoring /noconfig option because it was specified in a response file\r\n", outWriter.ToString(), StringComparison.Ordinal); 8376Assert.Contains(fileName + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8385Assert.Contains(fileName + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8395Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8404Assert.Contains(source + @"(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8413Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 8422Assert.Contains(source + "(6,16): warning CS0168: The variable 'x' is declared but never used", outWriter.ToString(), StringComparison.Ordinal); 9420Assert.Contains(CodeAnalysisResources.AnalyzerExecutionTimeColumnHeader, output, StringComparison.Ordinal); 9421Assert.Contains($"{nameof(WarningDiagnosticAnalyzer)} (Warning01)", output, StringComparison.Ordinal); 9422Assert.Contains($"{nameof(DiagnosticSuppressorForId)} (Suppressor01)", output, StringComparison.Ordinal); 9423Assert.Contains(CodeAnalysisResources.GeneratorNameColumnHeader, output, StringComparison.Ordinal); 9424Assert.Contains(typeof(DoNothingGenerator).FullName, output, StringComparison.Ordinal); 9520Assert.Contains(CodeAnalysisResources.AnalyzerExecutionTimeColumnHeader, output, StringComparison.Ordinal); 9521Assert.Contains(new WarningDiagnosticAnalyzer().ToString(), output, StringComparison.Ordinal); 9570Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.Id, output, StringComparison.Ordinal); 9573Assert.Contains(AnalyzerExecutor.AnalyzerExceptionDiagnosticId, output, StringComparison.Ordinal); 9574Assert.Contains(nameof(NotImplementedException), output, StringComparison.Ordinal); 9595Assert.Contains(AnalyzerExecutor.AnalyzerExceptionDiagnosticId, output, StringComparison.Ordinal); 9596Assert.Contains(nameof(NotImplementedException), output, StringComparison.Ordinal); 9617Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.Id, output, StringComparison.Ordinal); 9618Assert.Contains(AnalyzerThatThrowsInGetMessage.Rule.MessageFormat.ToString(CultureInfo.InvariantCulture), output, StringComparison.Ordinal); 9662Assert.Contains("CS2006", outWriter.ToString(), StringComparison.Ordinal); 9667Assert.Contains("CS2006", outWriter.ToString(), StringComparison.Ordinal); 9672Assert.Contains("CS2038", outWriter.ToString(), StringComparison.Ordinal); 9677Assert.Contains("CS2038", outWriter.ToString(), StringComparison.Ordinal); 9704Assert.Contains("CS2021", outWriter.ToString(), StringComparison.Ordinal); 9811Assert.Contains("error CS0006: Metadata file 'com2.dll' could not be found", outWriter.ToString(), StringComparison.Ordinal); 9817Assert.Contains("error CS0006: Metadata file '..\\lpt8.dll' could not be found", outWriter.ToString(), StringComparison.Ordinal); 9823Assert.Contains("warning CS1668: Invalid search path 'aux' specified in '/LIB option' -- 'directory does not exist'", outWriter.ToString(), StringComparison.Ordinal); 9985Assert.Contains(errorMessage, output, StringComparison.Ordinal); 10615Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10627Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10631Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10652Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10660Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10668Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10672Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10673Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10677Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10681Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10685Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10689Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10693Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10705Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10709Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10710Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10714Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10715Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10719Assert.Contains("error CS8032", output, StringComparison.Ordinal); 10723Assert.Contains("a.cs(2,1): error Hidden01: Throwing a diagnostic for #region", output, StringComparison.Ordinal); 10731Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10739Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10743Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10764Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10766Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10773Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10778Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10782Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10784Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10788Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10789Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10793Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10795Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10799Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10803Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10807Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10811Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10821Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10823Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10827Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10828Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10832Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10833Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10838Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10843Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10847Assert.Contains("a.cs(2,1): error Info01: Throwing a diagnostic for #pragma restore", 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); 10858Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10862Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10864Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10868Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10870Assert.Contains("a.cs(2,1): info Info01: Throwing a diagnostic for #pragma restore", output, StringComparison.Ordinal); 10917Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10918Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10919Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10927Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10931Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10932Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10933Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10937Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10938Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10942Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10943Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10947Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10948Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10949Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10953Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10954Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10955Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10960Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10961Assert.Contains("a.cs(6,13): error CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10962Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10966Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 10967Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 10968Assert.Contains("warning CS8032", 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); 10974Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10990Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10994Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 10998Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11002Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11024Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11028Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11029Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11030Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11034Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11035Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11036Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11040Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11041Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11042Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11046Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11050Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11051Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11052Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11056Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11057Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11058Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11062Assert.Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11063Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11064Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11068Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11072Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11076Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11077Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11078Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11082Assert.Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared", output, StringComparison.Ordinal); 11083Assert.Contains("a.cs(6,13): warning CS0168: The variable 'i' is declared but never used", output, StringComparison.Ordinal); 11084Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11103Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11104Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11108Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11112Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11116Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11120Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11124Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11128Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11132Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11136Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11140Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11144Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11148Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11151Assert.Contains("error CS8032", output, StringComparison.Ordinal); 11154Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11155Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11159Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11160Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11163Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11164Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11167Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 11168Assert.Contains("a.cs(2,1): error Error01: Throwing a diagnostic for #pragma disable", output, StringComparison.Ordinal); 11238Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11242Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11246Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11249Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11253Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11256Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11259Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11263Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11266Assert.Contains("a.cs(6,17): error CS0029: Cannot implicitly convert type 'System.Exception' to 'int'", output, StringComparison.Ordinal); 11269Assert.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); 12483Assert.Contains("error CS8101: The pathmap option was incorrectly formatted.", outWriter.ToString(), StringComparison.Ordinal); 12503Assert.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); 12526Assert.Contains("warning CS0078", output, StringComparison.Ordinal); 12531Assert.Contains("error CS0078", output, StringComparison.Ordinal); 12550Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12551Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12578Assert.Contains("warning CS1522", output, StringComparison.Ordinal); 12594Assert.Contains($"info SP0001", output, StringComparison.Ordinal); 12595Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12600Assert.Contains("error CS1522", output, StringComparison.Ordinal); 12612Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12613Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12634Assert.Contains("warning CS0169", output, StringComparison.Ordinal); 12650Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12651Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12656Assert.Contains("error CS0169", output, StringComparison.Ordinal); 12668Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12669Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12732Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12733Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12734Assert.Contains("error CS1001", output, StringComparison.Ordinal); 12754Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12755Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12756Assert.Contains("error CS1001", output, StringComparison.Ordinal); 12830Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12831Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12832Assert.Contains("error CS0180", output, StringComparison.Ordinal); 12855Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12856Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12857Assert.Contains("error CS0180", output, StringComparison.Ordinal); 12940Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12941Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12942Assert.Contains("error CS0122", output, StringComparison.Ordinal); 12965Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 12966Assert.Contains("info SP0001", output, StringComparison.Ordinal); 12967Assert.Contains("error CS0122", output, StringComparison.Ordinal); 12985Assert.Contains("error CS1001", output, StringComparison.Ordinal); 12990Assert.Contains("error CS1001", output, StringComparison.Ordinal); 13011Assert.Contains("error CS0246", output, StringComparison.Ordinal); 13016Assert.Contains("error CS0246", output, StringComparison.Ordinal); 13036Assert.Contains($"warning {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13055Assert.Contains("info SP0001", output, StringComparison.Ordinal); 13056Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 13063Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13073Assert.Contains("info SP0001", output, StringComparison.Ordinal); 13074Assert.Contains(suppressionMessage, output, StringComparison.Ordinal); 13083Assert.Contains($"warning {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13103Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13111Assert.Contains($"error {analyzer.Descriptor.Id}", output, StringComparison.Ordinal); 13682Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13692Assert.Contains("warning CS8669", output, StringComparison.Ordinal); 13700Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13708Assert.Contains("warning CS8602", output, StringComparison.Ordinal); 13743Assert.Contains("warning AD0001: Analyzer 'Microsoft.CodeAnalysis.CommonDiagnosticAnalyzers+NamedTypeAnalyzerWithConfigurableEnabledByDefault' threw an exception of type 'System.NotImplementedException'", 13948Assert.Contains("warning Warning01", output, StringComparison.Ordinal); 13949Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 13953Assert.Contains("warning CS8032", output, StringComparison.Ordinal); 14939Assert.Contains("MultipleGlobalAnalyzerKeys:", output, StringComparison.Ordinal); 14940Assert.Contains("'option1'", output, StringComparison.Ordinal); 14941Assert.Contains("'Global Section'", output, StringComparison.Ordinal); 14958Assert.Contains("MultipleGlobalAnalyzerKeys:", output, StringComparison.Ordinal); 14959Assert.Contains("'option1'", output, StringComparison.Ordinal); 14960Assert.Contains("'/file.cs'", output, StringComparison.Ordinal); 15195Assert.Contains("b.txt(1,3): warning ID0001", output, StringComparison.Ordinal); 15448Assert.Contains("warning CS8034", output, StringComparison.Ordinal); 15455Assert.Contains("error CS8034", output, StringComparison.Ordinal); 15472Assert.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.AI.Integration.Tests (3)
ChatClientIntegrationTests.cs (3)
50Assert.Contains("whale", response.Message.Text, StringComparison.OrdinalIgnoreCase); 89Assert.Contains("one small step", responseText, StringComparison.OrdinalIgnoreCase); 90Assert.Contains("one giant leap", responseText, 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);