862 B
862 B
Xunit instructions
These instructions apply when consuming this test framework from an Xunit project. This is an addendum to general instructions outlined in our README.
-
Install the NuGet package
Microsoft.VisualStudio.Sdk.TestFramework.Xunit
-
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(); } }