93 references to TestHelpers
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
50=> TestHelpers.Diagnostic(IDEDiagnosticIds.RemoveUnnecessaryParenthesesDiagnosticId, text, startLocation: new LinePosition(line, column));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
22using static Roslyn.Test.Utilities.TestHelpers;
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (1)
16using static Roslyn.Test.Utilities.TestHelpers;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
50=> TestHelpers.Diagnostic(IDEDiagnosticIds.RemoveUnnecessaryParenthesesDiagnosticId, text, startLocation: new LinePosition(line, column));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
22using static Roslyn.Test.Utilities.TestHelpers;
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (1)
16using static Roslyn.Test.Utilities.TestHelpers;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
1479return TestHelpers.GetCultureInvariantString(constantValue.Value);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Compilation\CompilationAPITests.cs (1)
29using static Roslyn.Test.Utilities.TestHelpers;
DocumentationComments\DocumentationCommentCompilerTests.cs (5)
5058Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 6048Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 6097Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 7037Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFile.Path)), actual); 8672<!-- Badly formed XML file ""{Path.Combine(TestHelpers.AsXmlCommentText(path), "- - -.xml")}"" cannot be included -->
DocumentationComments\DocumentationModeTests.cs (1)
391var expectedText = string.Format(expectedTextTemplate, TestHelpers.AsXmlCommentText(xmlFilePath));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxTreeTests.cs (1)
21using static Roslyn.Test.Utilities.TestHelpers;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (20)
CodeActions\CodeActionResolveTests.cs (1)
215var filePath = TestHelpers.GetRootedPath("C.cs");
Definitions\GoToDefinitionTests.cs (1)
104DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(TestHelpers.GetRootedPath(TestSpanMapper.GeneratedFileName)),
Diagnostics\PullDiagnosticTests.cs (3)
2156var results = await resultTask.WithTimeout(TestHelpers.HangMitigatingTimeout); 2184var results = await resultTask.WithTimeout(TestHelpers.HangMitigatingTimeout); 2213var results = await resultTask.WithTimeout(TestHelpers.HangMitigatingTimeout);
References\FindImplementationsTests.cs (1)
99DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(TestHelpers.GetRootedPath(TestSpanMapper.GeneratedFileName)),
Rename\RenameTests.cs (5)
94<Document FilePath = "{TestHelpers.GetRootedPath("C.cs")}"><![CDATA[{markup}]]></Document> 97<Document IsLinkFile = "true" LinkAssemblyName="CSProj" LinkFilePath="{TestHelpers.GetRootedPath("C.cs")}"/> 139<Document FilePath = "{TestHelpers.GetRootedPath("C.cs")}"><![CDATA[{markup}]]></Document> 142<Document IsLinkFile = "true" LinkAssemblyName="CSProj" LinkFilePath="{TestHelpers.GetRootedPath("C.cs")}"/> 177DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(TestHelpers.GetRootedPath(TestSpanMapper.GeneratedFileName)),
SpellCheck\SpellCheckTests.cs (2)
361var csharpFilePath = TestHelpers.GetRootedPath("C.cs"); 362var typeScriptFilePath = TestHelpers.GetRootedPath("T.ts");
UriTests.cs (2)
90var documentFilePath = TestHelpers.GetRootedPath("A.cs"); 91var projectFilePath = TestHelpers.GetRootedPath("CSProj1.csproj");
Workspaces\LspWorkspaceManagerTests.cs (5)
311<Document FilePath="{TestHelpers.CreateAbsolutePath("FirstWorkspace.cs")}">FirstWorkspace</Document> 321<Document FilePath="{TestHelpers.CreateAbsolutePath("SecondWorkspace.cs")}">SecondWorkspace</Document> 370<Document FilePath="{TestHelpers.CreateAbsolutePath("FirstWorkspace.cs")}">FirstWorkspace</Document> 380<Document FilePath="{TestHelpers.CreateAbsolutePath("SecondWorkspace.cs")}">SecondWorkspace</Document> 502var filePath = TestHelpers.CreateAbsolutePath("\ue25b\ud86d\udeac.cs");
Microsoft.CodeAnalysis.LanguageServer.UnitTests (5)
FileBasedProgramsWorkspaceTests.cs (5)
400TestHelpers.Diagnostic(code: 9298, squiggledText: ":").WithLocation(1, 2)); 499TestHelpers.Diagnostic(code: 9298, squiggledText: ":").WithLocation(1, 2)); 573TestHelpers.Diagnostic(code: 9298, squiggledText: ":").WithLocation(1, 2)); 711TestHelpers.Diagnostic(code: 9298, squiggledText: ":").WithLocation(1, 2)); 1093TestHelpers.Diagnostic(code: 9298, squiggledText: ":").WithLocation(1, 2));
Microsoft.CodeAnalysis.Test.Utilities (5)
Mocks\Silverlight.cs (1)
77var publicKey = TestHelpers.HexToByte(publicKeyText.AsSpan());
Mocks\StdOle.cs (1)
64var publicKey = TestHelpers.HexToByte(publicKeyText.AsSpan());
Platform\Custom\MetadataSignatureHelper.cs (1)
84sb.Append(Roslyn.Test.Utilities.TestHelpers.GetCultureInvariantString(value));
TestBase.cs (2)
333return TestHelpers.Diagnostic( 352return TestHelpers.Diagnostic(
Microsoft.CodeAnalysis.UnitTests (5)
Analyzers\AnalyzerConfigTests.cs (1)
16using static Roslyn.Test.Utilities.TestHelpers;
CryptoBlobParserTests.cs (4)
173Assert.False(CryptoBlobParser.TryParseKey(TestHelpers.HexToByte(invalidKeyBlobs[0].AsSpan()), out _, out _)); 174Assert.False(CryptoBlobParser.TryParseKey(TestHelpers.HexToByte(invalidKeyBlobs[1].AsSpan()), out _, out _)); 175Assert.False(CryptoBlobParser.TryParseKey(TestHelpers.HexToByte(invalidKeyBlobs[2].AsSpan()), out _, out _)); 176Assert.False(CryptoBlobParser.TryParseKey(TestHelpers.HexToByte(invalidKeyBlobs[3].AsSpan()), out _, out _));
Microsoft.CodeAnalysis.Workspaces.UnitTests (43)
CommandLineProject\CommandLineProjectTests.cs (14)
25var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 40var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory"), ws); 48_ = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, @"goo.cs", TestHelpers.GetRootedPath("ProjectDirectory"), ws); 55var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 66var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 77var baseDir = TestHelpers.GetRootedPath("ProjectDirectory"); 89var baseDir = TestHelpers.GetRootedPath("ProjectDirectory"); 102var commandLine = TestHelpers.GetRootedPath("SomeDirectory", "goo.cs"); 103var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 114var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 125var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, TestHelpers.GetRootedPath("ProjectDirectory")); 136var baseDir = TestHelpers.GetRootedPath("ProjectDirectory"); 179var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.VisualBasic, commandLine, baseDirectory: TestHelpers.GetRootedPath("ProjectDirectory")); 191var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.VisualBasic, commandLine, baseDirectory: TestHelpers.GetRootedPath("ProjectDirectory"));
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
57var baseDir = TestHelpers.GetRootedPath("ProjectDirectory");
GeneratedCodeRecognitionTests.cs (3)
61"""), filePath: TestHelpers.GetRootedPath(".editorconfig")).Project; 67"""), filePath: TestHelpers.GetRootedPath(".editorconfig")).Project; 83var document = project.AddDocument(fileName, "", filePath: Path.Combine(TestHelpers.GetRootedPath(), fileName));
SolutionTests\SolutionTests.cs (11)
4112.AddDocument(did, "x", new WorkspaceFileTextLoader(solution.Services, TestHelpers.GetRootedPath("doesnotexist.cs"), Encoding.UTF8)) 4873solution = solution.AddDocument(sourceDocumentId, "Test" + extension, "", filePath: TestHelpers.GetRootedPath("Test" + extension)); 4883filePath: TestHelpers.GetRootedPath(".editorconfig"), 4909solution = solution.AddDocument(sourceDocumentId, "Test" + extension, "", filePath: TestHelpers.GetRootedPath("Test" + extension)); 4916filePath: TestHelpers.GetRootedPath(".editorconfig"), 4950solution = solution.AddDocument(sourceDocumentId, "Test" + extension, "", filePath: TestHelpers.GetRootedPath("Test" + extension)); 4957filePath: TestHelpers.GetRootedPath(".editorconfig"), 4995solution = solution.AddDocument(sourceDocumentId, "Test.cs", "", filePath: TestHelpers.GetRootedPath("Test.cs")); 5005filePath: TestHelpers.GetRootedPath(".globalconfig"), 5036""", filePath: TestHelpers.GetRootedPath("Test.cs")); 5051filePath: TestHelpers.GetRootedPath(".editorconfig"),
UtilityTest\FilePathUtilitiesTests.cs (14)
17var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 18var fullPath = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma", "Doc.txt"); 28var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 29var fullPath = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma", "Delta", "Doc.txt"); 39var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 40var fullPath = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Doc.txt"); 50var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 51var fullPath = TestHelpers.GetRootedPath("Alpha", "Beta", "Doc.txt"); 61var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 62var fullPath = TestHelpers.GetRootedPath("Alpha", "Doc.txt"); 72var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta", "Gamma"); 73var fullPath = TestHelpers.GetRootedPath("Alpha", "Phi", "Omega", "Doc.txt"); 94var baseDirectory = TestHelpers.GetRootedPath("Alpha", "Beta"); 95var fullPath = TestHelpers.GetRootedPath("Alpha", "Beta2", "Gamma");