131 references to Workspace
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (59)
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (7)
40
=> environment.
Workspace
.CurrentSolution.Projects.Single().DefaultNamespace;
58
var project = environment.
Workspace
.CurrentSolution.Projects.Single();
63
var canApply = environment.
Workspace
.CanApplyParseOptionChange(
87
var project = environment.
Workspace
.CurrentSolution.Projects.Single();
90
var canApply = environment.
Workspace
.CanApplyParseOptionChange(
136
Assert.Equal(expectedRunAnalyzers, environment.
Workspace
.CurrentSolution.Projects.Single().State.RunAnalyzers);
156
Assert.Equal(expectedRunAnalyzers, environment.
Workspace
.CurrentSolution.Projects.Single().State.RunAnalyzers);
ProjectSystemShim\CPS\AnalyzersTests.cs (5)
34
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
41
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
67
var ca1012DiagnosticOption = environment.
Workspace
.CurrentSolution.Projects.Single().CompilationOptions.SpecificDiagnosticOptions["CA1012"];
84
Assert.Equal(ruleSetFile.Path, environment.
Workspace
.TryGetRuleSetPathForProject(projectId));
88
Assert.Null(environment.
Workspace
.TryGetRuleSetPathForProject(projectId));
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (5)
32
var parseOptions = environment.
Workspace
.CurrentSolution.Projects.Single().ParseOptions;
41
var parseOptions = environment.
Workspace
.CurrentSolution.Projects.Single().ParseOptions;
177
Assert.Equal(SourceHashAlgorithms.Default, environment.
Workspace
.CurrentSolution.Projects.Single().State.ChecksumAlgorithm);
181
var project = environment.
Workspace
.CurrentSolution.Projects.Single();
182
Assert.Equal(SourceHashAlgorithm.Sha1, environment.
Workspace
.CurrentSolution.Projects.Single().State.ChecksumAlgorithm);
ProjectSystemShim\CPS\CSharpReferencesTests.cs (7)
51
return environment.
Workspace
57
return environment.
Workspace
.CurrentSolution.GetProject(project3.Id)
101
Assert.Single(environment.
Workspace
.CurrentSolution.GetProject(project2.Id).AllProjectReferences);
105
Assert.Empty(environment.
Workspace
.CurrentSolution.GetProject(project2.Id).AllProjectReferences);
106
Assert.Single(environment.
Workspace
.CurrentSolution.GetProject(project2.Id).MetadataReferences);
122
Assert.Empty(environment.
Workspace
.CurrentSolution.GetProject(project1.Id).AllProjectReferences);
139
return environment.
Workspace
.CurrentSolution.Projects.Single()
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (11)
30
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
49
IEnumerable<TextDocument> GetCurrentAdditionalDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().AdditionalDocuments;
67
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
68
VersionStamp GetVersion() => environment.
Workspace
.CurrentSolution.Projects.Single().Version;
117
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
158
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
211
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
250
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
289
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
325
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
374
IEnumerable<Document> GetCurrentDocuments() => environment.
Workspace
.CurrentSolution.Projects.Single().Documents;
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (5)
61
var projectId = environment.
Workspace
.CurrentSolution.ProjectIds.Single();
62
Assert.Equal(ruleSetFile.Path, environment.
Workspace
.TryGetRuleSetPathForProject(projectId));
80
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
87
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
214
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (9)
36
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
50
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
64
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
114
=> environment.
Workspace
.CurrentSolution.GetRequiredProject(project.Test_ProjectSystemProject.Id).CompilationOutputInfo.AssemblyPath;
147
=> environment.
Workspace
.CurrentSolution.GetRequiredProject(project.Test_ProjectSystemProject.Id).CompilationOutputInfo.AssemblyPath;
190
var project = environment.
Workspace
.CurrentSolution.Projects.Single();
196
var canApply = environment.
Workspace
.CanApplyParseOptionChange(
221
var project = environment.
Workspace
.CurrentSolution.Projects.Single();
227
var canApply = environment.
Workspace
.CanApplyParseOptionChange(
ProjectSystemShim\LegacyProject\OutputPathTests.cs (1)
35
var workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single();
ProjectSystemShim\LegacyProject\SourceFileHandlingTests.cs (7)
30
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().Documents);
44
var document = environment.
Workspace
.CurrentSolution.Projects.Single().Documents.Single();
57
var document = environment.
Workspace
.CurrentSolution.Projects.Single().Documents.Single();
67
var projectFolder = Path.GetDirectoryName(environment.
Workspace
.CurrentSolution.Projects.Single().FilePath);
71
var document = environment.
Workspace
.CurrentSolution.Projects.Single().Documents.Single();
81
var projectFolder = Path.GetDirectoryName(environment.
Workspace
.CurrentSolution.Projects.Single().FilePath);
85
var document = environment.
Workspace
.CurrentSolution.Projects.Single().Documents.Single();
ProjectSystemShim\LifetimeTests.cs (2)
25
Assert.Single(environment.
Workspace
.CurrentSolution.Projects);
30
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects);
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (3)
ProjectSystemShim\Framework\TestEnvironment.vb (1)
167
Return
Workspace
.CurrentSolution.Projects.Single().CompilationOptions
ProjectSystemShim\Framework\WorkspaceChangeWatcher.vb (2)
23
AddHandler environment.
Workspace
.WorkspaceChanged, AddressOf OnWorkspaceChanged
40
RemoveHandler _environment.
Workspace
.WorkspaceChanged, AddressOf OnWorkspaceChanged
Microsoft.VisualStudio.LanguageServices.UnitTests (69)
ProjectSystemShim\VisualBasicCodeModelLifetimeTests.vb (5)
28
Dim originalDocumentId = environment.
Workspace
.CurrentSolution.Projects.Single().DocumentIds.Single()
30
Dim originalFileCodeModel = environment.
Workspace
.GetFileCodeModel(originalDocumentId)
34
Assert.Throws(Of ArgumentException)(Sub() environment.
Workspace
.GetFileCodeModel(originalDocumentId))
38
Dim newDocumentId = environment.
Workspace
.CurrentSolution.Projects.Single().DocumentIds.Single()
39
Dim newFileCodeModel = environment.
Workspace
.GetFileCodeModel(newDocumentId)
ProjectSystemShim\VisualBasicCompilerOptionsTests.vb (10)
25
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
44
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
63
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
86
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
109
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
129
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
149
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
168
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
188
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
196
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
ProjectSystemShim\VisualBasicProjectTests.vb (3)
20
Assert.Equal(environment.
Workspace
.CurrentSolution.Projects.Single().Name, "Test")
24
Assert.Equal(environment.
Workspace
.CurrentSolution.Projects.Single().Name, "Test2")
35
Assert.Single(environment.
Workspace
.CurrentSolution.Projects)
ProjectSystemShim\VisualBasicSpecialReferencesTests.vb (10)
22
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
41
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
60
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
77
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
84
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
92
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
107
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
122
Dim workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
128
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
134
workspaceProject = environment.
Workspace
.CurrentSolution.Projects.Single()
ProjectSystemShim\VisualStudioProjectTests\AnalyzerReferenceTests.vb (12)
37
Assert.Single(environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences)
52
Dim analyzers = environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
76
Dim analyzers = environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
98
Dim analyzers = environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Single().GetAnalyzers(LanguageNames.CSharp)
138
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences)
143
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences)
158
}, environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
172
}, environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
182
}, environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
192
}, environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
217
AssertEx.Equal({path1, path2}, environment.
Workspace
.CurrentSolution.Projects.Single().AnalyzerReferences.Select(Function(r) r.FullPath))
229
environment.
Workspace
,
ProjectSystemShim\VisualStudioProjectTests\DynamicFileTests.vb (4)
39
Dim dynamicSourceFile = environment.
Workspace
.CurrentSolution.Projects.Single().Documents.Single()
47
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().Documents)
89
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().Documents)
93
Assert.Empty(environment.
Workspace
.CurrentSolution.Projects.Single().Documents)
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (10)
30
Dim getProject2 = Function() environment.
Workspace
.CurrentSolution.GetProject(project2.Id)
67
Dim getProject2 = Function() environment.
Workspace
.CurrentSolution.GetProject(project2.Id)
102
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
138
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
175
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
203
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
249
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
264
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
300
Dim getReferencingProject = Function() environment.
Workspace
.CurrentSolution.GetProject(referencingProject.Id)
369
Assert.Single(environment.
Workspace
.CurrentSolution.Projects.Single().MetadataReferences)
ProjectSystemShim\VisualStudioProjectTests\SolutionIdTests.vb (4)
19
Dim solutionId = environment.
Workspace
.CurrentSolution.Id
27
Assert.NotEqual(solutionId, environment.
Workspace
.CurrentSolution.Id)
36
Dim solutionId = environment.
Workspace
.CurrentSolution.Id
40
Assert.Equal(solutionId, environment.
Workspace
.CurrentSolution.Id)
ProjectSystemShim\VisualStudioProjectTests\SourceTextContainerTests.vb (2)
28
Assert.Single(environment.
Workspace
.GetOpenDocumentIds())
32
Assert.Empty(environment.
Workspace
.GetOpenDocumentIds())
ProjectSystemShim\VisualStudioProjectTests\WorkspaceChangedEventTests.vb (6)
31
Assert.Equal(environment.
Workspace
.CurrentSolution.Projects.Single().DocumentIds.Single(), change.DocumentId)
71
Assert.Equal(environment.
Workspace
.CurrentSolution.Projects.Single().AdditionalDocumentIds.Single(), change.DocumentId)
101
Dim startingSolution = environment.
Workspace
.CurrentSolution
106
Assert.Same(startingSolution, environment.
Workspace
.CurrentSolution)
132
Assert.Single(environment.
Workspace
.GetOpenDocumentIds())
136
Assert.Empty(environment.
Workspace
.GetOpenDocumentIds())
SolutionExplorer\AnalyzersFolderProviderTests.vb (3)
23
New AnalyzersFolderItemSourceProvider(environment.
Workspace
, Nothing)
35
New AnalyzersFolderItemSourceProvider(environment.
Workspace
, Nothing)
66
Dim provider As IAttachedCollectionSourceProvider = New AnalyzersFolderItemSourceProvider(environment.
Workspace
, New FakeAnalyzersCommandHandler)