Skip to content

Commit

Permalink
Implemented Accept match Option Feature (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
nscheibe authored Jul 29, 2022
1 parent 7860166 commit b0a1fca
Show file tree
Hide file tree
Showing 367 changed files with 9,599 additions and 358 deletions.
28 changes: 0 additions & 28 deletions .vscode/launch.json

This file was deleted.

15 changes: 0 additions & 15 deletions .vscode/tasks.json

This file was deleted.

3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "3.1.302"
"version": "6.0.100",
"rollForward": "latestMinor"
}
}
14 changes: 1 addition & 13 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="DefaultPushSource" value="https://api.nuget.org/v3/index.json" />
</config>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<activePackageSource>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</activePackageSource>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<IsPackable>false</IsPackable>
<AssemblyName>Snapshooter.Examples.Xunit</AssemblyName>
<RootNamespace>Snapshooter.Examples.Xunit</RootNamespace>
Expand Down
4 changes: 2 additions & 2 deletions samples/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6</TargetFramework>
<AssemblyName>Snapshooter.Tests.Data</AssemblyName>
<RootNamespace>Snapshooter.Tests.Data</RootNamespace>
<IsPackable>false</IsPackable>
Expand Down
10 changes: 10 additions & 0 deletions src/Dependencies.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>
<PropertyGroup Label="Package Versions">
<xUnitVersion>2.4.1</xUnitVersion>
</PropertyGroup>

<PropertyGroup Label="Framework Versions">
<TestProjectTargetFrameworks>netcoreapp3.1;net6.0</TestProjectTargetFrameworks>
<ResourceProjectTargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0</ResourceProjectTargetFrameworks>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
<CCSettingsProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'Settings.props'))</CCSettingsProps>
<CCVersionProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'Version.props'))</CCVersionProps>
<CCPackageProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'Package.props'))</CCPackageProps>
<CCTestProjectProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'TestProject.props'))</CCTestProjectProps>
<CCResourceProjectProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'ResourceProject.props'))</CCResourceProjectProps>
<CCDependenciesProps>$([System.IO.Path]::Combine($(CCSourceDirectory), 'Dependencies.props'))</CCDependenciesProps>
</PropertyGroup>

<Import Project="$(CCDependenciesProps)" Condition="Exists('$(CCDependenciesProps)')"/>
<Import Project="$(CCSettingsProps)" Condition="Exists('$(CCSettingsProps)')"/>
<Import Project="$(CCVersionProps)" Condition="Exists('$(CCVersionProps)')"/>
<Import Project="$(CCPackageProps)" Condition="Exists('$(CCPackageProps)')"/>

</Project>
1 change: 1 addition & 0 deletions src/Package.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIconUrl>https://github.com/SwissLife-OSS/snapshooter/raw/master/logo.png</PackageIconUrl>
<IsPackable>false</IsPackable>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
24 changes: 24 additions & 0 deletions src/ResourceProject.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>

<PropertyGroup>
<TargetFrameworks>$(ResourceProjectTargetFrameworks)</TargetFrameworks>
<RootNamespace>Snapshooter</RootNamespace>
<IsPackable>true</IsPackable>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit.core" Version="$(xUnitVersion)" />
</ItemGroup>

</Project>
8 changes: 0 additions & 8 deletions src/Settings.props

This file was deleted.

28 changes: 17 additions & 11 deletions src/Snapshooter.Json.Tests/Snapshooter.Json.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
<Import Project="$(CCTestProjectProps)" Condition="Exists('$(CCTestProjectProps)')" />

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Snapshooter.Json.Tests</AssemblyName>
<RootNamespace>Snapshooter.Json.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Snapshooter.Json\Snapshooter.Json.csproj" />
<ProjectReference Include="..\Snapshooter.Tests.Data\Snapshooter.Tests.Data.csproj" />
Expand All @@ -26,4 +17,19 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.7.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Moq" Version="4.18.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
21 changes: 7 additions & 14 deletions src/Snapshooter.Json/Snapshooter.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CCResourceProjectProps)" Condition="Exists('$(CCResourceProjectProps)')" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Snapshooter.Json</AssemblyName>
<RootNamespace>Snapshooter.Json</RootNamespace>
<PackageId>Snapshooter.Json</PackageId>
<Description>
Json Snapshooter is a flexible snapshot testing tool for .Net unit tests.
It creates and asserts json snapshots in unit tests without any .Net test framework required.
</Description>
<IsPackable>true</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Snapshooter\Snapshooter.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
</ItemGroup>

</Project>
8 changes: 6 additions & 2 deletions src/Snapshooter.Json/Snapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,20 @@ private static Snapshooter Snapshooter
{
get
{
var snapshotSerializer =
new SnapshotSerializer(new GlobalSnapshotSettingsResolver());

return
new Snapshooter(
new SnapshotAssert(
new SnapshotSerializer(new GlobalSnapshotSettingsResolver()),
snapshotSerializer,
new SnapshotFileHandler(),
new SnapshotEnvironmentCleaner(
new SnapshotFileHandler()),
new JsonSnapshotComparer(
new JsonAssert(),
new SnapshotSerializer(new GlobalSnapshotSettingsResolver()))),
snapshotSerializer),
new JsonSnapshotFormatter(snapshotSerializer)),
new SnapshotFullNameResolver(
new JsonSnapshotFullNameReader()));
}
Expand Down
31 changes: 20 additions & 11 deletions src/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CCTestProjectProps)" Condition="Exists('$(CCTestProjectProps)')" />

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Snapshooter.NUnit.Tests</AssemblyName>
<RootNamespace>Snapshooter.NUnit.Tests</RootNamespace>
<nullable>enable</nullable>
<IsPackable>false</IsPackable>
<LangVersion>8.0</LangVersion>
<RootNamespace>Snapshooter.NUnit.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Snapshooter.NUnit\Snapshooter.NUnit.csproj" />
<ProjectReference Include="..\Snapshooter.Tests.Data\Snapshooter.Tests.Data.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.7.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Moq" Version="4.18.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
26 changes: 9 additions & 17 deletions src/Snapshooter.NUnit/Snapshooter.NUnit.csproj
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CCResourceProjectProps)" Condition="Exists('$(CCResourceProjectProps)')" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Snapshooter.NUnit</AssemblyName>
<RootNamespace>Snapshooter.NUnit</RootNamespace>
<PackageId>Snapshooter.NUnit</PackageId>
<Description>
NUnit Snapshooter is a flexible snapshot testing tool for .Net unit tests with NUnit.
It creates and asserts snapshots (json format) within NUnit unit tests.
</Description>
<IsPackable>true</IsPackable>
</Description>
<IsTestProject>false</IsTestProject>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Snapshooter\Snapshooter.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
</ItemGroup>

</Project>
8 changes: 6 additions & 2 deletions src/Snapshooter.NUnit/Snapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,16 +375,20 @@ private static Snapshooter Snapshooter
{
get
{
var snapshotSerializer =
new SnapshotSerializer(new GlobalSnapshotSettingsResolver());

return
new Snapshooter(
new SnapshotAssert(
new SnapshotSerializer(new GlobalSnapshotSettingsResolver()),
snapshotSerializer,
new SnapshotFileHandler(),
new SnapshotEnvironmentCleaner(
new SnapshotFileHandler()),
new JsonSnapshotComparer(
new NUnitAssert(),
new SnapshotSerializer(new GlobalSnapshotSettingsResolver()))),
snapshotSerializer),
new JsonSnapshotFormatter(snapshotSerializer)),
new SnapshotFullNameResolver(
new NUnitSnapshotFullNameReader()));
}
Expand Down
Loading

0 comments on commit b0a1fca

Please sign in to comment.