A test library to help in writing unit and integration tests for Visual Studio extensions.
$ dotnet add package Microsoft.VisualStudio.Sdk.TestFramework.XunitThis package contains functionality applicable when using Xunit v2 as your test framework.
For each of your test classes that rely on VS mocked services, apply the Collection attribute and add a parameter and statement to your constructor:
using Microsoft.VisualStudio.Sdk.TestFramework;
[Collection(MockedVS.Collection)]
public class YourTestClass
{
public TestFrameworkTests(GlobalServiceProvider sp)
{
sp.Reset();
}
}