Skip to content

Commit 4e7a407

Browse files
committed
Update tests to represent their current behaviour
1 parent 4238928 commit 4e7a407

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorProjectServiceTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ public async Task OpenDocument_OpensAlreadyAddedDocumentInMiscellaneousProject()
606606
}
607607

608608
[Fact]
609-
public async Task OpenDocument_OpensAndAddsDocumentToOwnerProject()
609+
public async Task OpenDocument_OpensAndAddsDocumentToMiscellaneousProject()
610610
{
611611
// Arrange
612612
const string ProjectFilePath = "C:/path/to/project.csproj";
@@ -617,7 +617,7 @@ public async Task OpenDocument_OpensAndAddsDocumentToOwnerProject()
617617
var ownerProjectKey = await _projectService.AddProjectAsync(
618618
ProjectFilePath, IntermediateOutputPath, RazorConfiguration.Default, RootNamespace, displayName: null, DisposalToken);
619619

620-
var ownerProject = _projectManager.GetLoadedProject(ownerProjectKey);
620+
var miscProject = await _snapshotResolver.GetMiscellaneousProjectAsync(DisposalToken);
621621

622622
using var listener = _projectManager.ListenToNotifications();
623623

@@ -626,8 +626,8 @@ public async Task OpenDocument_OpensAndAddsDocumentToOwnerProject()
626626

627627
// Assert
628628
listener.AssertNotifications(
629-
x => x.DocumentAdded(DocumentFilePath, ownerProject.Key),
630-
x => x.DocumentChanged(DocumentFilePath, ownerProject.Key));
629+
x => x.DocumentAdded(DocumentFilePath, miscProject.Key),
630+
x => x.DocumentChanged(DocumentFilePath, miscProject.Key));
631631

632632
Assert.True(_projectManager.IsDocumentOpen(DocumentFilePath));
633633
}
@@ -678,7 +678,7 @@ public async Task AddDocument_AddsDocumentToOwnerProject()
678678
}
679679

680680
[Fact]
681-
public async Task AddDocument_AddsDocumentToMiscellaneousProject()
681+
public async Task AddDocumentToMiscProjectAsync_AddsDocumentToMiscellaneousProject()
682682
{
683683
// Arrange
684684
const string DocumentFilePath = "document.cshtml";
@@ -688,7 +688,7 @@ public async Task AddDocument_AddsDocumentToMiscellaneousProject()
688688
using var listener = _projectManager.ListenToNotifications();
689689

690690
// Act
691-
await _projectService.AddDocumentToPotentialProjectsAsync(DocumentFilePath, DisposalToken);
691+
await _projectService.AddDocumentToMiscProjectAsync(DocumentFilePath, DisposalToken);
692692

693693
// Assert
694694
listener.AssertNotifications(

0 commit comments

Comments
 (0)