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()); 1254Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1255Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1264Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1265Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1266Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1290Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1291Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1300Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1301Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1302Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1323Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1324Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1330Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1331Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1332Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1351Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1352Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1358Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1359Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1360Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1062var projectId = workspace.Projects[0].Id;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
61workspace.Projects.Single().Id,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (3)
68workspace.OnProjectRemoved(project.Id); 171var projectWithConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithConfig.Id); 210var projectWithoutConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithoutConfig.Id);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Workspaces\TestHostProject`1.cs (2)
151ProjectReferences = projectReferences != null ? projectReferences.Select(p => new ProjectReference(p.Id)) : SpecializedCollections.EmptyEnumerable<ProjectReference>(); 252Id,
Workspaces\TestWorkspace`1.cs (5)
325=> this.Projects.FirstOrDefault(p => p.Id == projectId); 666OnProjectReferenceAdded(fromProject.Id, new ProjectReference(toProject.Id, aliases.Any() ? aliases : default)); 681OnProjectReferenceAdded(submissions[i].Id, new ProjectReference(submissions[j].Id));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
116solution = solution.WithProjectFilePath(project.Id, PathRoot + project.Name);