Skip to content

Commit faf7e45

Browse files
authored
Release/1.6 (#188)
* Updating to v1.6 * Fixing numeric to non-int-derived enum mapping * v1.6-preview1 NuGet package * Mapping non-mappable-element enumerables to empty collections * Support for type-pairing using interfaces, re: #163 * v1.6-preview2 * Adding project icon * Bugs/issue163 (#164) * Adding .NET Core 3 test project * Removing assembly scanning for interfaces / Handling interface -> implementation type pairing / Tidying * Removing issue-specific test + updating .NET Core 3 package versions * Updating icon, adding v1.6-preview3 package * Tidying * Tidying * Tidying * Splitting Root- and MemberDataSourceSetFactories * Adding EmptyDataSourceSet / Filtering out unusable fallback data sources in DataSourceSet factory method instead of MemberPopulator * Making EmptyDataSourceSet a singleton / Adding NullMemberPopulator * Removing IEnumerable from IDataSourceSet * Extending interface mapping test coverage * Fixing .NET 3.5 source filters * Features/simple type create instances using (#169) * Failing unit test / Simplifying configured factory creation * Tidying * Support for configured object factories for simple (not primitive) types, re: #165 * Splitting out incorrect object factory configuration tests * Removing unnecessary ignore from test * Implementing simple type factories using ObjectFactories * Adding lightweight IMemberMapperData implementation * Creating element mapper data when using a configured simple type object factory for an enumerable element * Support for simple type factory use in simple type enumerable mapping * Support for conditional simple-type factories / Splitting simple-type factory tests into dedicated test class * Support for conditional simple value factories with fallback to default conversion * Support for simple type factory Funcs * Support for nullable simple type factories * Optimising simple type factory expression creation * Test coverage for nullable simple type to simple type factory / Support for TimeSpan mapping (?!) * Handling nested access checks in nullable-to-simple type factory use * TimeSpan mapping test coverage * Fixing test for .NET 3.5 * Adding package icon setting * Bugs/issue166 (#170) * Only populating MapperDatas in maptime-created ObjectMappingDatas if necessary + available, re: #166 * Renames for clarity * Tidying * Updating release notes * Fixing translation of mapping plans with assignment of a local enum variable, re: #168 (#171) Using GetVariableNameInCamelCase() for multi-invocation local variables * Only creting a mapping LambdaExpression when necessary * Organising mapping data source factory classes * Tidying * Updating to v1.6-preview4 * Lazy-loading ObjectMapperData ChidMapperData and DataSourcesByTargetMember * Replacing Dictionary<,> with simple array-based alternative * General tidying * Ensuring root mapping plans include the mapper func parameter * Removing capture creation in QualifiedMember pathfactories * Using less derived parameter types * Handling runtime-typed, simple-to-complex data sources configured using Map(s => s, t=> t), re: #174 (#177) * Features/element index (#178) * Renaming EnumerableIndex to ElementIndex * Adding ElementKey through, adding failing test * Support for ElementKey! * Support for ElementKey with element-value-typed source Dictionaries * Extra test coverage * Updating to v1.6-preview5 * Type-Specific naming rules in the static API (#181) * Fixing API / Adding ConfiguredNamingPattern / Adding type-specific naming tests * Tidying * Updating naming settings to be non-ruleset-specific * Moving MapperContext into BasicMapperData * Tidying * Renaming BasicMapperData * Setting QualifiedMemberContext on members * Fixing tests * Updating documentation * Updating release notes * Bugs/183 abstract member validation (#185) * Support for applying custom data sources to base types only * Improved detection of unmappable target types in mapping validation * Tidying * Extra test coverage * Explicit support for DateTimeOffset mapping, re: #183 * Counting System.Drawing as a Base Class Library, re: #180 * Removing root source dynamic mapping tests from .NET Standard 1.0, re: #183 * Features/derived type mapping improvements (#186) * Support for using MapTo() without specifying a derived source type, re: #172 * Test coverage for nested interface type pairing, re: #172 * Bugs/176 complex type data source method (#187) * Adding failing tests re: using a custom method as a data source for a complex type * Splitting NestedAccessCheck finding and Multi-invocation finding / Moving multi-invocation handling to MemberPopulator * Making ExpressionInfoFinder static * Moving multi-invocation handling back into DataSourceBase * Applying multi-invocation replacements to DataSourceBase populations * Handling assignment of chained multi-invocation variables / Optimising Expression replacement * Handling null return values from custom object factories / Optimising Member Binding generation * Registering static method complex type data sources as factoey methods * Optimising for single multi-invocation * Tidying * Processing multi-invocations in DataSource finalisation * Revert "Processing multi-invocations in DataSource finalisation" This reverts commit 5312747. * Avoiding multi-invocation processing of alternate population branches * Processing multi-invocations in DataSource finalisation * Skipping multi-invocation checks for composite data source value expressions Optimising empty child mapper data collection access * Fixing .NET 3.5 invocation comparison
1 parent 114e399 commit faf7e45

File tree

288 files changed

+6586
-4046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

288 files changed

+6586
-4046
lines changed

AgileMapper.UnitTests.Common/Should.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ public static void NotThrow<TException>(Action testAction)
6060
{
6161
testAction.Invoke();
6262
}
63-
catch (TException)
63+
catch (TException ex)
6464
{
65-
throw new Exception("Did not expect exception of type " + typeof(TException).Name);
65+
throw new Exception(
66+
$"Did not expect exception of type {ex.GetType().Name}: {ex.Message}");
6667
}
6768
}
6869
}

AgileMapper.UnitTests.MoreTestClasses/AgileMapper.UnitTests.MoreTestClasses.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFrameworks>net35;netstandard1.0</TargetFrameworks>
66
<AssemblyName>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</AssemblyName>
77
<RootNamespace>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</RootNamespace>
8+
<IsPackable>false</IsPackable>
89
</PropertyGroup>
910

1011
<ItemGroup>

AgileMapper.UnitTests.Net35/AgileMapper.UnitTests.Net35.csproj

+2-593
Large diffs are not rendered by default.

AgileMapper.UnitTests.NetCore/AgileMapper.UnitTests.NetCore.csproj

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore</AssemblyName>
8-
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore</PackageId>
98
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
109
<RuntimeFrameworkVersion>1.1.9</RuntimeFrameworkVersion>
1110
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@@ -14,6 +13,7 @@
1413
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1514
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
1615
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore</RootNamespace>
16+
<IsPackable>false</IsPackable>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -25,10 +25,10 @@
2525
</PropertyGroup>
2626

2727
<ItemGroup>
28-
<PackageReference Include="System.Data.Common" Version="4.3.0" />
2928
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
3029
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
3130
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
31+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
3232
<PackageReference Include="xunit" Version="2.4.1" />
3333
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
3434
<PrivateAssets>all</PrivateAssets>
@@ -48,6 +48,10 @@
4848
</Compile>
4949
</ItemGroup>
5050

51+
<ItemGroup>
52+
<Compile Remove="..\AgileMapper.UnitTests\TestClasses\PublicOtherInterface.cs" />
53+
</ItemGroup>
54+
5155
<ItemGroup>
5256
<Compile Include="..\CommonAssemblyInfo.cs" Link="Properties\CommonAssemblyInfo.cs" />
5357
</ItemGroup>

AgileMapper.UnitTests.NetCore2.1/AgileMapper.UnitTests.NetCore2.1.csproj

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFramework>netcoreapp2.1</TargetFramework>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_1</AssemblyName>
8-
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2_1</PackageId>
98
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
109
<RuntimeFrameworkVersion>2.1.2</RuntimeFrameworkVersion>
1110
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@@ -14,25 +13,23 @@
1413
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1514
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
1615
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
16+
<IsPackable>false</IsPackable>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
20-
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
20+
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2121
</PropertyGroup>
2222

2323
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
24-
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NETCOREAPP2_1;NET_STANDARD</DefineConstants>
24+
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2525
</PropertyGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
28-
<PackageReference Include="System.Data.Common" Version="4.3.0" />
29-
</ItemGroup>
30-
3127
<ItemGroup>
3228
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
3329
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
3430
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.1.6" />
3531
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
32+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
3633
<PackageReference Include="xunit" Version="2.4.1" />
3734
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
3835
<PrivateAssets>all</PrivateAssets>

AgileMapper.UnitTests.NetCore2.2/AgileMapper.UnitTests.NetCore2.2.csproj

+5-8
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<PropertyGroup>
55
<TargetFramework>netcoreapp2.2</TargetFramework>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7-
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_1</AssemblyName>
8-
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2_1</PackageId>
7+
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_2</AssemblyName>
98
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
109
<RuntimeFrameworkVersion>2.2.2</RuntimeFrameworkVersion>
1110
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@@ -14,25 +13,23 @@
1413
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1514
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
1615
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
16+
<IsPackable>false</IsPackable>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
20-
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
20+
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2121
</PropertyGroup>
2222

2323
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
24-
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
24+
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2525
</PropertyGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
28-
<PackageReference Include="System.Data.Common" Version="4.3.0" />
29-
</ItemGroup>
30-
3127
<ItemGroup>
3228
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
3329
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
3430
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.2.0" />
3531
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
32+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
3633
<PackageReference Include="xunit" Version="2.4.1" />
3734
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
3835
<PrivateAssets>all</PrivateAssets>

AgileMapper.UnitTests.NetCore2/AgileMapper.UnitTests.NetCore2.csproj

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFramework>netcoreapp2.0</TargetFramework>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2</AssemblyName>
8-
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2</PackageId>
98
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
109
<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>
1110
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@@ -14,25 +13,23 @@
1413
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1514
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
1615
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
16+
<IsPackable>false</IsPackable>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
20-
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
20+
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2121
</PropertyGroup>
2222

2323
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
24-
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
24+
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
2525
</PropertyGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
28-
<PackageReference Include="System.Data.Common" Version="4.3.0" />
29-
</ItemGroup>
30-
3127
<ItemGroup>
3228
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
3329
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
3430
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.0.0" />
3531
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
32+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
3633
<PackageReference Include="xunit" Version="2.4.1" />
3734
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
3835
<PrivateAssets>all</PrivateAssets>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="..\common.props" />
3+
4+
<PropertyGroup>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
6+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7+
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore3</AssemblyName>
8+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
9+
<RuntimeFrameworkVersion>3.0.0</RuntimeFrameworkVersion>
10+
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
11+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
12+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
13+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
14+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
15+
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
16+
<IsPackable>false</IsPackable>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
20+
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
21+
</PropertyGroup>
22+
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
24+
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;FEATURE_DYNAMIC_ROOT_SOURCE;</DefineConstants>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
29+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
30+
<PackageReference Include="Microsoft.Extensions.Primitives" Version="3.0.0" />
31+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
32+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
33+
<PackageReference Include="xunit" Version="2.4.1" />
34+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
35+
<PrivateAssets>all</PrivateAssets>
36+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
37+
</PackageReference>
38+
</ItemGroup>
39+
40+
<ItemGroup>
41+
<ProjectReference Include="..\AgileMapper.UnitTests.Common\AgileMapper.UnitTests.Common.csproj" />
42+
<ProjectReference Include="..\AgileMapper.UnitTests.MoreTestClasses\AgileMapper.UnitTests.MoreTestClasses.csproj" />
43+
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
44+
</ItemGroup>
45+
46+
<ItemGroup>
47+
<Compile Include="..\AgileMapper.UnitTests\**\*.cs" Exclude="..\AgileMapper.UnitTests\obj\**\*.cs;..\AgileMapper.UnitTests\WhenUsingPartialTrust.cs;">
48+
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
49+
</Compile>
50+
</ItemGroup>
51+
52+
<ItemGroup>
53+
<Compile Include="..\CommonAssemblyInfo.cs" Link="Properties\CommonAssemblyInfo.cs" />
54+
</ItemGroup>
55+
56+
<ItemGroup>
57+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
58+
</ItemGroup>
59+
60+
</Project>

AgileMapper.UnitTests.NonParallel/AgileMapper.UnitTests.NonParallel.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
<DebugType>full</DebugType>
2727
<Optimize>false</Optimize>
2828
<OutputPath>bin\Debug\</OutputPath>
29-
<DefineConstants>DEBUG;TRACE</DefineConstants>
29+
<DefineConstants>DEBUG;TRACE;FEATURE_DYNAMIC_ROOT_SOURCE</DefineConstants>
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3434
<DebugType>pdbonly</DebugType>
3535
<Optimize>true</Optimize>
3636
<OutputPath>bin\Release\</OutputPath>
37-
<DefineConstants>TRACE</DefineConstants>
37+
<DefineConstants>TRACE;FEATURE_DYNAMIC_ROOT_SOURCE</DefineConstants>
3838
<ErrorReport>prompt</ErrorReport>
3939
<WarningLevel>4</WarningLevel>
4040
</PropertyGroup>

AgileMapper.UnitTests.Orms.EFCore2.NetCore2/AgileMapper.UnitTests.Orms.EfCore2.NetCore2.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFramework>netcoreapp2.0</TargetFramework>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</AssemblyName>
8-
<PackageId>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</PackageId>
98
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
109
<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>
1110
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@@ -16,6 +15,7 @@
1615
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
1716
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
1817
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</RootNamespace>
18+
<IsPackable>false</IsPackable>
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

AgileMapper.UnitTests.Orms.EfCore2/Configuration/Inline/WhenValidatingProjectionsInline.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ await context
5656

5757
validationEx.Message.ShouldContain("IQueryable<Address> -> IQueryable<PublicStringCtorDto>");
5858
validationEx.Message.ShouldContain("Rule set: Project");
59-
validationEx.Message.ShouldContain("Unconstructable target Types");
59+
validationEx.Message.ShouldContain("Unmappable target Types");
6060
validationEx.Message.ShouldContain("Address -> PublicStringCtorDto");
6161
});
6262
}

AgileMapper.UnitTests.Orms.EfCore2/Configuration/WhenConfiguringObjectCreation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Task ShouldNotUseMappingDataConfiguredSourceAndTargetDataSource()
2626
mapper.WhenMapping
2727
.From<PublicInt>()
2828
.To<PublicIntDto>()
29-
.CreateInstancesUsing(ctx => new PublicIntDto { Value = ctx.EnumerableIndex.GetValueOrDefault() });
29+
.CreateInstancesUsing(ctx => new PublicIntDto { Value = ctx.ElementIndex.GetValueOrDefault() });
3030

3131
await context.IntItems.AddAsync(new PublicInt { Value = 17 });
3232
await context.SaveChangesAsync();

AgileMapper.UnitTests.Orms/WhenValidatingProjections.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Task ShouldErrorIfCachedProjectionTargetTypeIsUnconstructable()
6060

6161
validationEx.Message.ShouldContain("IQueryable<Address> -> IQueryable<PublicStringCtorDto>");
6262
validationEx.Message.ShouldContain("Rule set: Project");
63-
validationEx.Message.ShouldContain("Unconstructable target Types");
63+
validationEx.Message.ShouldContain("Unmappable target Types");
6464
validationEx.Message.ShouldContain("Address -> PublicStringCtorDto");
6565

6666
return Task.CompletedTask;

AgileMapper.UnitTests/AgileMapper.UnitTests.csproj

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<DebugType>full</DebugType>
2727
<Optimize>false</Optimize>
2828
<OutputPath>bin\Debug\</OutputPath>
29-
<DefineConstants>DEBUG;TRACE;NET40</DefineConstants>
29+
<DefineConstants>DEBUG;TRACE;NET40;FEATURE_DYNAMIC_ROOT_SOURCE</DefineConstants>
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
<Prefer32Bit>false</Prefer32Bit>
@@ -35,7 +35,7 @@
3535
<DebugType>pdbonly</DebugType>
3636
<Optimize>true</Optimize>
3737
<OutputPath>bin\Release\</OutputPath>
38-
<DefineConstants>TRACE;NET40</DefineConstants>
38+
<DefineConstants>TRACE;NET40;FEATURE_DYNAMIC_ROOT_SOURCE</DefineConstants>
3939
<ErrorReport>prompt</ErrorReport>
4040
<WarningLevel>4</WarningLevel>
4141
<Prefer32Bit>false</Prefer32Bit>
@@ -112,8 +112,10 @@
112112
<Compile Include="Configuration\WhenApplyingMapperConfigurations.cs" />
113113
<Compile Include="Configuration\WhenApplyingMapperConfigurationsIncorrectly.cs" />
114114
<Compile Include="Configuration\WhenConfiguringEntityMapping.cs" />
115+
<Compile Include="Configuration\WhenConfiguringObjectCreationIncorrectly.cs" />
115116
<Compile Include="Configuration\WhenConfiguringReverseDataSources.cs" />
116117
<Compile Include="Configuration\WhenConfiguringReverseDataSourcesIncorrectly.cs" />
118+
<Compile Include="Configuration\WhenConfiguringSimpleTypeCreation.cs" />
117119
<Compile Include="Configuration\WhenIgnoringSourceMembers.cs" />
118120
<Compile Include="Configuration\WhenIgnoringSourceMembersByFilter.cs" />
119121
<Compile Include="Configuration\WhenIgnoringSourceMembersByGlobalFilter.cs" />
@@ -171,6 +173,8 @@
171173
<Compile Include="MapperCloning\WhenCloningObjectFactories.cs" />
172174
<Compile Include="MapperCloning\WhenCloningStringFormatting.cs" />
173175
<Compile Include="SimpleTypeConversion\WhenConvertingToCharacters.cs" />
176+
<Compile Include="SimpleTypeConversion\WhenConvertingToDateTimeOffsets.cs" />
177+
<Compile Include="SimpleTypeConversion\WhenConvertingToTimeSpans.cs" />
174178
<Compile Include="SimpleTypeConversion\WhenConvertingToFlagsEnums.cs" />
175179
<Compile Include="Structs\Configuration\WhenConfiguringStructCreationCallbacks.cs" />
176180
<Compile Include="Structs\Configuration\WhenConfiguringStructDataSources.cs" />
@@ -232,6 +236,7 @@
232236
<Compile Include="TestClasses\PublicEnumerable.cs" />
233237
<Compile Include="TestClasses\PublicImplementation.cs" />
234238
<Compile Include="TestClasses\PublicIndex.cs" />
239+
<Compile Include="TestClasses\PublicOtherImplementation.cs" />
235240
<Compile Include="TestClasses\PublicSealed.cs" />
236241
<Compile Include="TestClasses\PublicPropertyStruct.cs" />
237242
<Compile Include="TestClasses\PublicTwoFields.cs" />

AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringNameMatchingInline.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,9 @@ public void ShouldHandleMultipleCustomSuffixesInline()
6868
{
6969
using (var mapper = Mapper.CreateNew())
7070
{
71-
mapper
72-
.WhenMapping
73-
.UseNameSuffixes("Str", "Int");
74-
75-
var source = new { ValueInt = 12345 };
76-
var result = mapper.Map(source).ToANew<PublicField<string>>();
71+
var result = mapper.Map(new { ValueInt = 12345 })
72+
.ToANew<PublicField<string>>(cfg => cfg
73+
.UseNameSuffixes("Str", "Int"));
7774

7875
result.Value.ShouldBe("12345");
7976
}

AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInline.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public void ShouldExtendMemberFilterConfiguration()
200200
internal static class ConfigurationExtensions
201201
{
202202
public static void IgnoreNameAndDiscount(
203-
this IFullMappingConfigurator<CustomerViewModel, Customer> config)
203+
this IFullMappingInlineConfigurator<CustomerViewModel, Customer> config)
204204
{
205205
config.Ignore(c => c.Name, c => c.Discount);
206206
}

0 commit comments

Comments
 (0)