Base:
property
Id
Microsoft.CodeAnalysis.Test.Utilities.AbstractTestHostProject.Id
67 references to Id
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (53)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
146
var dependentProject = workspace.Projects.Single(proj => proj.
Id
!= project.Id);
150
workspace.OnProjectReferenceAdded(dependentProject.
Id
, new ProjectReference(project.Id));
Workspaces\WorkspaceTests_EditorFeatures.cs (51)
69
workspace.OnParseOptionsChanged(project.
Id
, project.ParseOptions);
106
workspace.OnProjectRemoved(project.
Id
);
122
workspace.OnProjectRemoved(project.
Id
);
136
Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project.
Id
));
150
Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project2.
Id
));
227
.GetProjectState(project1.
Id
)
234
.GetProjectState(project2.
Id
)
267
Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.
Id
, new ProjectReference(project2.
Id
)));
282
var reference = new ProjectReference(project2.
Id
);
283
workspace.OnProjectReferenceAdded(project1.
Id
, reference);
304
workspace.OnProjectReferenceAdded(project1.
Id
, new ProjectReference(project2.
Id
));
306
Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.
Id
, new ProjectReference(project2.
Id
)));
321
workspace.OnProjectReferenceAdded(project1.
Id
, new ProjectReference(project2.
Id
));
322
workspace.OnProjectReferenceRemoved(project1.
Id
, new ProjectReference(project2.
Id
));
343
workspace.OnProjectReferenceAdded(project1.
Id
, new ProjectReference(project2.
Id
));
345
Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project2.
Id
, new ProjectReference(project1.
Id
)));
360
workspace.OnProjectRemoved(project1.
Id
);
377
workspace.OnProjectRemoved(project1.
Id
);
396
workspace.OnProjectRemoved(project1.
Id
);
578
var newVersion = await cs.GetProject(project1.
Id
).GetDependentSemanticVersionAsync();
711
workspace.OnProjectRemoved(project1.
Id
);
761
var newSolution = oldSolution.AddDocument(DocumentId.CreateNewId(project1.
Id
), "Doc2", SourceText.From(doc2Text));
766
Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
787
Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1243
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1244
Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Count());
1253
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1254
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Count());
1255
Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Single().Name);
1279
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1280
Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Count());
1289
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1290
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Count());
1291
Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Single().Name);
1312
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1313
Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Count());
1319
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1320
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Count());
1321
Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.
Id
).AdditionalDocuments.Single().Name);
1340
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1341
Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Count());
1347
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).Documents.Count());
1348
Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Count());
1349
Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.
Id
).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1061
var projectId = workspace.Projects[0].
Id
;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
356
solution = solution.WithProjectFilePath(project.
Id
, GetDocumentFilePathFromName(project.FilePath));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
62
workspace.Projects.Single().
Id
,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (3)
68
workspace.OnProjectRemoved(project.
Id
);
156
var projectWithConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithConfig.
Id
);
195
var projectWithoutConfig = workspace.CurrentSolution.GetRequiredProject(testProjectWithoutConfig.
Id
);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Workspaces\TestHostProject`1.cs (2)
151
ProjectReferences = projectReferences != null ? projectReferences.Select(p => new ProjectReference(p.
Id
)) : SpecializedCollections.EmptyEnumerable<ProjectReference>();
252
Id
,
Workspaces\TestWorkspace`1.cs (5)
332
=> this.Projects.FirstOrDefault(p => p.
Id
== projectId);
693
OnProjectReferenceAdded(fromProject.
Id
, new ProjectReference(toProject.
Id
, aliases.Any() ? aliases : default));
708
OnProjectReferenceAdded(submissions[i].
Id
, new ProjectReference(submissions[j].
Id
));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
115
solution = solution.WithProjectFilePath(project.
Id
, PathRoot + project.Name);