43 references to SolutionTestHelpers
Microsoft.CodeAnalysis.Workspaces.UnitTests (43)
SolutionTests\DocumentInfoTests.cs (6)
109
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithId(value), opt => opt.Id, documentId, defaultThrows: true);
110
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithName(value), opt => opt.Name, "New", defaultThrows: true);
111
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithTextLoader(value), opt => opt.TextLoader, (TextLoader)new TestTextLoader("text"));
112
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithDesignTimeOnly(value), opt => opt.Attributes.DesignTimeOnly, true);
113
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithDocumentServiceProvider(value), opt => opt.DocumentServiceProvider, serviceProvider);
115
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithFolders(value), opt => opt.Folders, "folder", allowDuplicates: true);
SolutionTests\MetadataServiceTests.cs (3)
20
using var workspace =
SolutionTestHelpers
.CreateWorkspace();
38
using var workspace =
SolutionTestHelpers
.CreateWorkspace();
51
using var workspace =
SolutionTestHelpers
.CreateWorkspace();
SolutionTests\ProjectInfoTests.cs (18)
186
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithId(value), opt => opt.Id, ProjectId.CreateNewId(), defaultThrows: true);
187
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithVersion(value), opt => opt.Version, VersionStamp.Create());
188
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithName(value), opt => opt.Name, "New", defaultThrows: true);
189
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithAssemblyName(value), opt => opt.AssemblyName, "New", defaultThrows: true);
190
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithFilePath(value), opt => opt.FilePath, "New");
191
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithOutputFilePath(value), opt => opt.OutputFilePath, "New");
192
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithOutputRefFilePath(value), opt => opt.OutputRefFilePath, "New");
193
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithCompilationOutputInfo(value), opt => opt.CompilationOutputInfo, new CompilationOutputInfo("NewPath", TempRoot.Root));
194
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithDefaultNamespace(value), opt => opt.DefaultNamespace, "New");
195
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithChecksumAlgorithm(value), opt => opt.ChecksumAlgorithm, SourceHashAlgorithm.None);
196
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithHasAllInformation(value), opt => opt.HasAllInformation, false);
197
SolutionTestHelpers
.TestProperty(instance, (old, value) => old.WithRunAnalyzers(value), opt => opt.RunAnalyzers, false);
199
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithDocuments(value), opt => opt.Documents, documentInfo, allowDuplicates: false);
200
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithAdditionalDocuments(value), opt => opt.AdditionalDocuments, documentInfo, allowDuplicates: false);
201
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithAnalyzerConfigDocuments(value), opt => opt.AnalyzerConfigDocuments, documentInfo, allowDuplicates: false);
202
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithAnalyzerReferences(value), opt => opt.AnalyzerReferences, (AnalyzerReference)new TestAnalyzerReference(), allowDuplicates: false);
203
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithMetadataReferences(value), opt => opt.MetadataReferences, (MetadataReference)new TestMetadataReference(), allowDuplicates: false);
204
SolutionTestHelpers
.TestListProperty(instance, (old, value) => old.WithProjectReferences(value), opt => opt.ProjectReferences, new ProjectReference(projectId), allowDuplicates: false);
SolutionTests\ProjectSemanticVersionTests.cs (1)
10
using static Microsoft.CodeAnalysis.UnitTests.
SolutionTestHelpers
;
SolutionTests\SolutionTests.cs (13)
35
using static Microsoft.CodeAnalysis.UnitTests.
SolutionTestHelpers
;
1525
SolutionTestHelpers
.TestProperty(
1580
SolutionTestHelpers
.TestProperty(
1603
SolutionTestHelpers
.TestProperty(
1626
SolutionTestHelpers
.TestProperty(
1646
SolutionTestHelpers
.TestProperty(
1739
SolutionTestHelpers
.TestProperty(
1762
SolutionTestHelpers
.TestProperty(
1826
SolutionTestHelpers
.TestProperty(
1982
SolutionTestHelpers
.TestListProperty(solution,
2141
SolutionTestHelpers
.TestListProperty(solution,
2211
SolutionTestHelpers
.TestListProperty(solution,
2283
SolutionTestHelpers
.TestListProperty(solution,
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
28
using static Microsoft.CodeAnalysis.UnitTests.
SolutionTestHelpers
;
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
15
using static Microsoft.CodeAnalysis.UnitTests.
SolutionTestHelpers
;