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