Base:
property
Id
Microsoft.CodeAnalysis.Test.Utilities.AbstractTestHostProject.Id
66 references to Id
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (53)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
145var dependentProject = workspace.Projects.Single(proj => proj.Id != project.Id); 149workspace.OnProjectReferenceAdded(dependentProject.Id, new ProjectReference(project.Id));
Workspaces\WorkspaceTests_EditorFeatures.cs (51)
68workspace.OnParseOptionsChanged(project.Id, project.ParseOptions); 105workspace.OnProjectRemoved(project.Id); 121workspace.OnProjectRemoved(project.Id); 135Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project.Id)); 149Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project2.Id)); 226.GetProjectState(project1.Id) 233.GetProjectState(project2.Id) 266Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 281var reference = new ProjectReference(project2.Id); 282workspace.OnProjectReferenceAdded(project1.Id, reference); 303workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 305Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 320workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 321workspace.OnProjectReferenceRemoved(project1.Id, new ProjectReference(project2.Id)); 342workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id)); 344Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project2.Id, new ProjectReference(project1.Id))); 359workspace.OnProjectRemoved(project1.Id); 376workspace.OnProjectRemoved(project1.Id); 395workspace.OnProjectRemoved(project1.Id); 585var newVersion = await cs.GetProject(project1.Id).GetDependentSemanticVersionAsync(); 722workspace.OnProjectRemoved(project1.Id); 772var newSolution = oldSolution.AddDocument(DocumentId.CreateNewId(project1.Id), "Doc2", SourceText.From(doc2Text)); 777Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 798Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1256Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1257Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1266Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1267Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1268Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1292Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1293Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1302Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1303Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1304Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1325Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1326Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1332Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1333Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1334Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1353Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1354Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1360Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1361Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1362Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1249var projectId = workspace.Projects[0].Id;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
61workspace.Projects.Single().Id,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (3)
70workspace.OnProjectRemoved(project.Id); 173var projectWithConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithConfig.Id); 212var projectWithoutConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithoutConfig.Id);
Workspaces\SourceGeneratedDocumentUriTests.cs (1)
29var generatedDocumentId = DocumentId.CreateFromSerialized(testLspServer.TestWorkspace.Projects.Single().Id, Guid.NewGuid(), isSourceGenerated: true, debugName: HintName);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Workspaces\TestHostProject`1.cs (2)
152ProjectReferences = projectReferences != null ? projectReferences.Select(p => new ProjectReference(p.Id)) : SpecializedCollections.EmptyEnumerable<ProjectReference>(); 253Id,
Workspaces\TestWorkspace`1.cs (5)
329=> this.Projects.FirstOrDefault(p => p.Id == projectId); 670OnProjectReferenceAdded(fromProject.Id, new ProjectReference(toProject.Id, aliases.Any() ? aliases : default)); 685OnProjectReferenceAdded(submissions[i].Id, new ProjectReference(submissions[j].Id));