UEAT.DeepAsserts
1.3.0
.NET Core 1.1
.NET Framework 4.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
Install-Package UEAT.DeepAsserts -Version 1.3.0
dotnet add package UEAT.DeepAsserts --version 1.3.0
<PackageReference Include="UEAT.DeepAsserts" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UEAT.DeepAsserts --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: UEAT.DeepAsserts, 1.3.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install UEAT.DeepAsserts as a Cake Addin
#addin nuget:?package=UEAT.DeepAsserts&version=1.3.0
// Install UEAT.DeepAsserts as a Cake Tool
#tool nuget:?package=UEAT.DeepAsserts&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DeepAsserts
C# - Assert a result to an expected value and provide the diff
Will compare all your public properties expect for those with [DeepAssertIgnore]
attribute.
Example with xUnit
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UEAT.DeepAsserts;
using Xunit;
namespace UnitTest
{
public class FranchiseRepositoryTests
{
private readonly SqlConnectionFactory _sqlConnectionFactory = new SqlConnectionFactory();
[Fact]
public async Task ListAsync_ReturnsFranchises()
{
var userContext = new UserContext(UserContextTestData.FranchiseHeadquarterApiKey, CultureEnum.FrenchCanadian, null, null);
var repository = new FranchiseRepository(userContext, _sqlConnectionFactory);
var franchises = await repository.ListAsync(OrderTypeEnum.Takeout);
DeepAssert.Equals(FranchiseTestData.FranchisesTakeout, franchises);
}
}
}
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Framework | net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 1.1
- Microsoft.NETCore.App (>= 1.1.2)
-
.NETFramework 4.5
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First release