Skip to content

sharwell/VsixTesting

 
 

Repository files navigation

VsixTesting

# Join the chat at https://gitter.im/josetr/VsixTesting Build status codecov

VsixTesting allows you to easily test your Visual Studio Extensions.

Image

Xunit

.csproj

<ItemGroup>
    <PackageReference Include="xunit" Version="2.3.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
    <PackageReference Include="VsixTesting.Xunit" Version="0.1.1-beta" />
    <PackageReference Include="VSSDK.Shell.11" Version="11.0.4" />
</ItemGroup>

.cs

using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Xunit;

namespace Tests
{  
    public class TestClass
    {
        [VsFact]
        void FactTest()
            =>  Assert.NotNull(Package.GetGlobalService(typeof(SVsWebBrowsingService)));

        [VsTheory]
        [InlineData(123)]
        void TheoryTest(int n)
        {
            Assert.NotNull(Package.GetGlobalService(typeof(SVsWebBrowsingService)));
            Assert.Equal(123, n);
        }
    }
}

Test Settings

ITestSettings.cs implemented by

Instance Settings

IInstanceSettings.cs implemented by

License

This repository is licensed with the Apache, Version 2.0 license.

About

VsixTesting allows you to easily test your Visual Studio Extensions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%