HostLoom.Mapping.Testing
0.22.1
dotnet add package HostLoom.Mapping.Testing --version 0.22.1
NuGet\Install-Package HostLoom.Mapping.Testing -Version 0.22.1
<PackageReference Include="HostLoom.Mapping.Testing" Version="0.22.1" />
<PackageVersion Include="HostLoom.Mapping.Testing" Version="0.22.1" />
<PackageReference Include="HostLoom.Mapping.Testing" />
paket add HostLoom.Mapping.Testing --version 0.22.1
#r "nuget: HostLoom.Mapping.Testing, 0.22.1"
#:package HostLoom.Mapping.Testing@0.22.1
#addin nuget:?package=HostLoom.Mapping.Testing&version=0.22.1
#tool nuget:?package=HostLoom.Mapping.Testing&version=0.22.1
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 | Versions 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. |
-
net10.0
- HostLoom.Mapping (>= 0.22.1)
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.22.1 | 110 | 11/20/2026 |
| 0.22.0 | 99 | 11/20/2026 |
| 0.21.0 | 95 | 11/20/2026 |
| 0.20.0 | 127 | 10/31/2026 |
| 0.19.0 | 115 | 10/29/2026 |
| 0.18.0 | 117 | 10/27/2026 |
| 0.17.0 | 120 | 10/25/2026 |
| 0.16.1 | 112 | 10/22/2026 |
| 0.16.0 | 110 | 10/14/2026 |
| 0.15.1 | 106 | 10/12/2026 |
| 0.15.0 | 116 | 10/4/2026 |
| 0.14.0 | 120 | 10/4/2026 |
| 0.13.0 | 115 | 9/28/2026 |
| 0.12.0 | 116 | 9/27/2026 |
| 0.11.0 | 128 | 9/25/2026 |
| 0.10.0 | 126 | 9/22/2026 |
| 0.9.0 | 110 | 9/22/2026 |
| 0.8.0 | 120 | 9/19/2026 |
| 0.7.0 | 133 | 9/17/2026 |
| 0.6.0 | 138 | 9/6/2026 |