Cohost\CohostApplyRenameEditEndpointTest.cs (17)
33(FilePath(oldName), ""),
34(FilePath($"{oldName}.cs"), additionalFileContents)
64(FilePath($"{newName}.cs"), additionalFileContents)
67var oldFileId = Assert.Single(solution.GetDocumentIdsWithFilePath(FilePath($"{oldName}.cs")));
70.AddDocument($"{newName}.cs", SourceText.From(additionalFileContents), filePath: FilePath($"{newName}.cs")).Project.Solution;
76OldFilePath = FilePath(oldName),
77NewFilePath = FilePath(newName)
103(FilePath(oldName), contents)
131(FilePath(newName), contents)
134var oldFileId = Assert.Single(solution.GetDocumentIdsWithFilePath(FilePath(oldName)));
137.AddAdditionalDocument(newName, SourceText.From(contents), filePath: FilePath(newName)).Project.Solution;
142OldFilePath = FilePath(oldName),
143NewFilePath = FilePath(newName)
170(FilePath(oldName), ""),
171(FilePath($"{additionalFileName}.cs"), additionalFileContents)
200OldFilePath = FilePath(oldName),
201NewFilePath = FilePath(newName)
Cohost\RazorRefactorNotifyServiceTest.cs (11)
30(FilePath("File.cs"), """
38Assert.Equal(FilePath("Component.razor"), move.source);
39Assert.Equal(FilePath("DifferentName.razor"), move.destination);
57(FilePath("File.cs"), """
76(FilePath("File.cs"), """
81(FilePath("Component.razor.cs"), """
93Assert.Equal(FilePath("Component.razor"), m.source);
94Assert.Equal(FilePath("DifferentName.razor"), m.destination);
98Assert.Equal(FilePath("Component.razor.cs"), m.source);
99Assert.Equal(FilePath("DifferentName.razor.cs"), m.destination);
106var razorDocument = CreateProjectAndRazorDocument(razorContents, documentFilePath: FilePath("Component.razor"), additionalFiles: additionalContent);
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\CodeActions\PromoteUsingDirectiveTests.cs (6)
103documentFilePath: FilePath(Path.Combine("My", "Deeply", "Nested", "File.razor")),
105(FilePath(Path.Combine("My", "Deeply", "_Imports.razor")), """
135documentFilePath: FilePath(Path.Combine("My", "Deeply", "Nested", "File.razor")),
137(FilePath(Path.Combine("My", "Deeply", "_Imports.razor")), """
168documentFilePath: FilePath(Path.Combine("My", "Deeply", "Nested", "File.razor")),
170(FilePath(Path.Combine("My", "Deeply", "_Imports.razor")), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\CodeActions\RemoveUnnecessaryDirectiveTests.cs (13)
461(FilePath("AboutBoxTagHelper.cs"), """
490(FilePath("AboutBoxTagHelper.cs"), """
520(FilePath("AboutBoxTagHelper.cs"), """
546(FilePath("AboutBoxTagHelper.cs"), """
577(FilePath("AboutBoxTagHelper.cs"), """
585(FilePath("FancyBoxTagHelper.cs"), """
616(FilePath("AboutBoxTagHelper.cs"), """
624(FilePath("FancyBoxTagHelper.cs"), """
654(FilePath("AboutBoxTagHelper.cs"), """
690(FilePath("AboutBoxTagHelper.cs"), """
698(FilePath("FancyBoxTagHelper.cs"), """
728(FilePath("AboutBoxTagHelper.cs"), """
755(FilePath("AboutBoxTagHelper.cs"), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\CodeActions\SimplifyTagToSelfClosingTests.cs (10)
35(FilePath("Component.razor"), """
64(FilePath("Component.razor"), """
98(FilePath("Component.razor"), """
162(FilePath("Component.razor"), """
183(FilePath("Component.razor"), """
206(FilePath("Component.razor"), """
234(FilePath("Component.razor"), """
268(FilePath("Component.razor"), """
313(FilePath("Component.razor"), """
358(FilePath("Component.razor"), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostGoToDefinitionEndpointTest.cs (24)
150additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
185additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
218additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
251additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
289additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
331additionalFiles: (FilePath("SurveyPrompt.cs"), surveyPrompt.Text));
373additionalFiles: (FilePath("SurveyPrompt.cs"), surveyPrompt.Text));
421additionalFiles: (FilePath("SurveyPrompt.razor"), surveyPrompt.Text));
473(FilePath("AuthorViewComponent.cs"),
506(FilePath("AboutBoxTagHelper.cs"),
542[(FilePath("AboutBoxTagHelper_1.cs"),
557(FilePath("AboutBoxTagHelper_2.cs"),
586(FilePath("AboutBoxTagHelper.cs"),
624[(FilePath("AboutBoxTagHelper_1.cs"),
639(FilePath("AboutBoxTagHelper_2.cs"),
668(FilePath("FooTagHelper.cs"), """
697(FilePath("FooTagHelper.cs"),
732(FilePath("FooTagHelper.cs"), """
761(FilePath("FooTagHelper.cs"),
796(FilePath("TagHelpers.cs"), """
836(FilePath("TagHelpers.cs"),
891additionalFiles: (FilePath("Views/Shared/_Partial.cshtml"), partialFileContent));
915additionalFiles: (FilePath("_Partial.cshtml"), partialFileContent));
945additionalFiles: (FilePath("Pages/Counter.razor"), counterFileContent));
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostRenameEndpointTest.cs (41)
81(FilePath("OtherFile.cs"), """
131(FilePath("OtherFile.cs"), """
168(FilePath("OtherFile.cs"), """
202(FilePath("OtherFile.cs"), """
235(FilePath("OtherFile.cs"), """
268(FilePath("OtherFile.cs"), """
301(FilePath("OtherFile.cs"), """
334(FilePath("Component.razor"), ""),
335(FilePath("DifferentName.razor"), "")
365(FilePath("Component.razor"), "")
419(FilePath("Component.razor"), """
481(FilePath("Component.razor"), """
546(FilePath("Component.razor"), """
604(FilePath("Component.razor"), "")
650(FilePath("Component.razor"), """
713(FilePath("Component.razor"), """
765(FilePath("Component.razor"), "")
785(FilePath("Component.razor"), "")
815(FilePath("Component.razor"), """
849(FilePath("Component.razor"), ""),
850(FilePath("OtherComponent.razor"), """
892(FilePath("Component.razor"), """
926(FilePath("Component.razor"), """
929(FilePath("OtherComponent.razor"), """
999(FilePath("Component.razor"), """
1005(FilePath("OtherComponent.razor"), """
1054(FilePath("Component.cs"), """
1063(FilePath("OtherComponent.razor"), """
1119(FilePath("Component.cs"), """
1128(FilePath("OtherComponent.razor"), """
1178(FilePath("Component.cs"), """
1185(FilePath("OtherComponent.razor"), """
1235(FilePath("Component.cs"), """
1244(FilePath("OtherComponent.razor"), """
1300(FilePath("File1.razor.css"), "")
1331(FilePath("File1.razor.cs"), """
1374(FilePath("Component.razor.css"), ""),
1375(FilePath("Component.razor"), """
1417(FilePath("Component.razor.css"), ""),
1418(FilePath("Component.razor.cs"), """
1425(FilePath("Component.razor"), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostWillRenameEndpointTest.cs (12)
22(FilePath("Component.razor"), ""),
23(FilePath("OtherComponent.razor"), """
45(FilePath("Component.razor"), """
48(FilePath("OtherComponent.razor"), """
73(FilePath("Component.razor"), """
76(FilePath("OtherComponent.razor"), """
98(FilePath("Component.razor"), ""),
99(FilePath("Component.razor.css"), ""),
100(FilePath("OtherComponent.razor"), """
123(FilePath("Component.razor"), ""),
124(FilePath("ExtraCode.cs"), """
134(FilePath("OtherComponent.razor"), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Formatting\MoreHtmlFormattingTest.cs (12)
69additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
100additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
128additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
156additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
190additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
258additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
347additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
379additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
417additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
485additionalFiles: [(FilePath("Components.cs"), GetComponents())]);
539(FilePath("Select.razor"), """
553(FilePath("SelectItem.razor"), """
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\ProjectAvailabilityTests.cs (9)
33(FilePath("Component.razor"), "")
46solution = AddProjectAndRazorDocument(solution, TestProjectData.SomeProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "@namespace SomeProject").Project.Solution;
49solution = AddProjectAndRazorDocument(solution, TestProjectData.AnotherProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "@namespace SomeProject").Project.Solution;
61solution = AddProjectAndRazorDocument(solution, TestProjectData.SomeProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "").Project.Solution;
64solution = AddProjectAndRazorDocument(solution, TestProjectData.AnotherProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "",
65additionalFiles: [(FilePath("OtherComponent.razor"), "@namespace AnotherProject")]).Project.Solution;
81solution = AddProjectAndRazorDocument(solution, TestProjectData.SomeProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "").Project.Solution;
84solution = AddProjectAndRazorDocument(solution, TestProjectData.AnotherProject.FilePath, projectId, DocumentId.CreateNewId(projectId), FilePath("Component.razor"), "").Project.Solution;
103return await componentAvailabilityService.GetProjectAvailabilityTextAsync(FilePath("Component.razor"), componentTypeName, DisposalToken);