MagicCSharp.Testing.Clients 1.1.4

dotnet add package MagicCSharp.Testing.Clients --version 1.1.4
                    
NuGet\Install-Package MagicCSharp.Testing.Clients -Version 1.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MagicCSharp.Testing.Clients" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MagicCSharp.Testing.Clients" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="MagicCSharp.Testing.Clients" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MagicCSharp.Testing.Clients --version 1.1.4
                    
#r "nuget: MagicCSharp.Testing.Clients, 1.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MagicCSharp.Testing.Clients@1.1.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MagicCSharp.Testing.Clients&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=MagicCSharp.Testing.Clients&version=1.1.4
                    
Install as a Cake Tool

MagicCSharp.Testing.Clients

Keeps [MagicClient] interfaces honest against the service they call. A client's path is written in its route attributes and again on the server's controller; this check fails the server's tests when the two drift, so the client needs no per-method path tests.

dotnet add package MagicCSharp.Testing.Clients

In the server's controller test project, which references both the server and its client library (the server itself never references its own client):

[Fact]
public void EveryLeasesClientRoute_IsServedByTheLeasingService()
{
    ClientRouteCheck.AssertEveryClientRouteIsServed(typeof(ILeasesClient).Assembly, typeof(LeasesController).Assembly);
}

The server's routes come from MVC's own action model, so area, controller and action tokens, inherited routes and ~/ read as they do in production; no host starts and no controller is constructed. Paths compare case-insensitively, {leaseId} matches {id:long}, and an optional {id?} matches with or without it. The check also fails when either assembly has no routes at all, which means the test named the wrong assembly.

ClientRouteCheck.CheckClientRoutes returns what was found on both sides for a test that asserts on it itself.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 65 11/22/2026
1.1.3 61 11/22/2026
1.1.2 63 11/22/2026
1.1.1 57 11/21/2026
1.1.0 59 11/21/2026