HostLoom.Mapping.Testing 0.15.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package HostLoom.Mapping.Testing --version 0.15.0
                    
NuGet\Install-Package HostLoom.Mapping.Testing -Version 0.15.0
                    
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="HostLoom.Mapping.Testing" Version="0.15.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HostLoom.Mapping.Testing" Version="0.15.0" />
                    
Directory.Packages.props
<PackageReference Include="HostLoom.Mapping.Testing" />
                    
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 HostLoom.Mapping.Testing --version 0.15.0
                    
#r "nuget: HostLoom.Mapping.Testing, 0.15.0"
                    
#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 HostLoom.Mapping.Testing@0.15.0
                    
#: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=HostLoom.Mapping.Testing&version=0.15.0
                    
Install as a Cake Addin
#tool nuget:?package=HostLoom.Mapping.Testing&version=0.15.0
                    
Install as a Cake Tool

HostLoom.Mapping.Testing

Builds a HostLoom.Mapping dispatcher from explicit maps, without a container.

IMapper mapper = new TestMapperBuilder()
    .Add<Customer, CustomerDto>(new CustomerMapper())
    .Add<Address, AddressDto>(source => new AddressDto(source.City, source.PostalCode))
    .Build();

var dto = mapper.From(customer).To<CustomerDto>();

The core package has no dependency-injection dependency, which is the right boundary but leaves a unit test that wants the dispatcher building an IServiceCollection to get one. This builds the same contract directly.

Substituting IMapper is the other option and a worse one. It needs a substitute per pair, and each returns what the test told it to rather than what the map would — so the test passes whether or not the map is correct. A real map, or an inline Func, keeps the assertion about behaviour.

Duplicate pairs are rejected here exactly as MappingBuilder rejects them, so a test cannot pass against a composition the container would refuse. A missing pair throws MappingNotFoundException naming both types and the destinations the source is mapped to.

Consumers that take a closed IMapper<TSource, TDestination> — the shape the HostLoom.Mapping README recommends — need nothing from this package: construct the map class and pass it.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
0.17.0 47 10/25/2026
0.16.1 45 10/22/2026
0.16.0 85 10/14/2026
0.15.1 83 10/12/2026
0.15.0 95 10/4/2026
0.14.0 96 10/4/2026
0.13.0 99 9/28/2026
0.12.0 94 9/27/2026
0.11.0 102 9/25/2026
0.10.0 108 9/22/2026
0.9.0 92 9/22/2026
0.8.0 103 9/19/2026
0.7.0 111 9/17/2026
0.6.0 122 9/6/2026
0.5.0 119 9/5/2026
0.4.0 124 9/3/2026
0.3.0 120 8/28/2026