Skip to content

Commit

Permalink
Add package baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKotsenas committed May 31, 2024
1 parent bfaa909 commit 6b6081f
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/Moq.Analyzers.Test/ModuleInitializer.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
8 changes: 6 additions & 2 deletions Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GetPackFromProject" Version="1.0.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="ApprovalTests" Version="3.0.22" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.9.3" />
Expand All @@ -27,6 +31,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Verify.Nupkg" Version="1.1.1" />
<PackageReference Include="Verify.Xunit" Version="24.2.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
Expand All @@ -35,8 +40,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Moq.Analyzers\Moq.Analyzers.csproj">
</ProjectReference>
<ProjectReference Include="..\Moq.Analyzers\Moq.Analyzers.csproj" AddPackageAsOutput="true" />
</ItemGroup>
<ItemGroup>
<Compile Update="Data\CallbackSignatureShouldMatchMockedMethod.cs">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/
|-- Moq.Analyzers.nuspec
|-- analyzers
| |-- dotnet
| | |-- cs
| | | |-- Moq.Analyzers.dll
|-- lib
| |-- netstandard2.0
| | |-- Moq.Analyzers.dll
|-- tools
| |-- install.ps1
| |-- uninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<package>
<metadata>
<id>Moq.Analyzers</id>
<version>********</version>
<authors>Andrey "Litee" Lipatkin</authors>
<licenseUrl>https://github.com/Litee/moq.analyzers/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/Litee/moq.analyzers</projectUrl>
<description>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.</description>
<releaseNotes>Upgraded to support Visual Studio 2019</releaseNotes>
<copyright>2015-2019 Andrey Lipatkin</copyright>
<tags>moq, mock, test, analyzers</tags>
<repository type="git" commit="****************************************" />
<dependencies>
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
</package>
30 changes: 30 additions & 0 deletions Source/Moq.Analyzers.Test/PackageTests.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}

0 comments on commit 6b6081f

Please sign in to comment.