diff --git a/Source/Moq.Analyzers.Test/ModuleInitializer.cs b/Source/Moq.Analyzers.Test/ModuleInitializer.cs new file mode 100644 index 00000000..3331f3c9 --- /dev/null +++ b/Source/Moq.Analyzers.Test/ModuleInitializer.cs @@ -0,0 +1,14 @@ +namespace Moq.Analyzers.Test +{ + using System.Runtime.CompilerServices; + using VerifyTests; + + public static class ModuleInitializer + { + [ModuleInitializer] + public static void Initialize() + { + VerifyNupkg.Initialize(); + } + } +} diff --git a/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj b/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj index 09d9f420..0bc8ca3a 100644 --- a/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj +++ b/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj @@ -14,6 +14,10 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -27,6 +31,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -35,8 +40,7 @@ - - + diff --git a/Source/Moq.Analyzers.Test/PackageTests.Baseline#contents.verified.txt b/Source/Moq.Analyzers.Test/PackageTests.Baseline#contents.verified.txt new file mode 100644 index 00000000..d25f0afc --- /dev/null +++ b/Source/Moq.Analyzers.Test/PackageTests.Baseline#contents.verified.txt @@ -0,0 +1,12 @@ +/ +|-- Moq.Analyzers.nuspec +|-- analyzers +| |-- dotnet +| | |-- cs +| | | |-- Moq.Analyzers.dll +|-- lib +| |-- netstandard2.0 +| | |-- Moq.Analyzers.dll +|-- tools +| |-- install.ps1 +| |-- uninstall.ps1 diff --git a/Source/Moq.Analyzers.Test/PackageTests.Baseline#manifest.verified.nuspec b/Source/Moq.Analyzers.Test/PackageTests.Baseline#manifest.verified.nuspec new file mode 100644 index 00000000..271f6ce6 --- /dev/null +++ b/Source/Moq.Analyzers.Test/PackageTests.Baseline#manifest.verified.nuspec @@ -0,0 +1,17 @@ + + + Moq.Analyzers + ******** + Andrey "Litee" Lipatkin + https://github.com/Litee/moq.analyzers/blob/master/LICENSE + https://github.com/Litee/moq.analyzers + Roslyn analyzer that helps to write unit tests using Moq mocking library by highlighting typical errors and suggesting quick fixes. Port of Resharper extension to Roslyn. Find the full list of detected issues at project GitHub page. + Upgraded to support Visual Studio 2019 + 2015-2019 Andrey Lipatkin + moq, mock, test, analyzers + + + + + + diff --git a/Source/Moq.Analyzers.Test/PackageTests.cs b/Source/Moq.Analyzers.Test/PackageTests.cs new file mode 100644 index 00000000..0cfe4da3 --- /dev/null +++ b/Source/Moq.Analyzers.Test/PackageTests.cs @@ -0,0 +1,30 @@ +namespace Moq.Analyzers.Test +{ + using System.IO; + using System.Linq; + using System.Reflection; + using System.Threading.Tasks; + using VerifyTests; + using VerifyXunit; + using Xunit; + + public class PackageTests + { + private static readonly FileInfo Package; + + static PackageTests() + { + Package = new FileInfo(Assembly.GetExecutingAssembly().Location) + .Directory! + .GetFiles("Moq.Analyzers*.nupkg") + .OrderByDescending(f => f.LastWriteTimeUtc) + .First(); + } + + [Fact] + public Task Baseline() + { + return Verifier.VerifyFile(Package).ScrubNuspec(); + } + } +}