HostLoom.Mapping.Testing
0.17.0
dotnet add package HostLoom.Mapping.Testing --version 0.17.0
NuGet\Install-Package HostLoom.Mapping.Testing -Version 0.17.0
<PackageReference Include="HostLoom.Mapping.Testing" Version="0.17.0" />
<PackageVersion Include="HostLoom.Mapping.Testing" Version="0.17.0" />
<PackageReference Include="HostLoom.Mapping.Testing" />
paket add HostLoom.Mapping.Testing --version 0.17.0
#r "nuget: HostLoom.Mapping.Testing, 0.17.0"
#:package HostLoom.Mapping.Testing@0.17.0
#addin nuget:?package=HostLoom.Mapping.Testing&version=0.17.0
#tool nuget:?package=HostLoom.Mapping.Testing&version=0.17.0
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.17.0)
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 |