Add infrastructure for doing unit testing of the generator library#239
Add infrastructure for doing unit testing of the generator library#239lambdageek merged 9 commits intodotnet:mainfrom
Conversation
Add the beginnings of a library that tests our Roslyn bindings
| <Uri>https://github.com/dotnet/arcade</Uri> | ||
| <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha> | ||
| </Dependency> | ||
| <Dependency Name="NuGet.Build.Tasks" Version="6.6.0-preview.2.29"> |
There was a problem hiding this comment.
do you really need a darc dependency for this or would an older version which is on nuget.org be fine?
There was a problem hiding this comment.
I couldn't get the unit tests to build/run with an older version - something was transitively loading the newest Nuget.Frameworks and then the MSBuildWorkspace was failing to open.
| public Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace Workspace { get; } | ||
| public GlobalFilesFixture GlobalFiles { get; } | ||
| public TempDirectory TempDir { get; } | ||
| public TempMSBuildWorkspaceTest(MSBuildLocatorFixture _1, GlobalFilesFixture globalFiles) |
There was a problem hiding this comment.
why do you need the MSBuildLocatorFixture as an arg here?
There was a problem hiding this comment.
Because I don't really understand how xUnit fixtures work. I'll see if I can remove it.
There was a problem hiding this comment.
Ok, that doesn't work actually. If you implement two IClassFixture<T> interfaces, you have to have a constructor with two fixture args - even if I only use the MSBuildLocator one for its side effects
Add the beginnings of a library that tests our Roslyn bindings