Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
9814270
Initial EF6 test project, test and public ProjectTo extension method
SteveWilkes Nov 3, 2017
98a0639
Building a Queryable.Select statement for queryable projection / Usin…
SteveWilkes Nov 3, 2017
70f03fa
Making mapping try - catch use ruleset-dependent
SteveWilkes Nov 3, 2017
44bb5ee
Making source element null-checking ruleset-dependent
SteveWilkes Nov 3, 2017
2c45b29
Making use of member initialisation object creations ruleset-dependent
SteveWilkes Nov 3, 2017
8c32b2a
Support for straightforward projection!
SteveWilkes Nov 3, 2017
70fd8ac
Using a mapper-scoped projection MappingContext
SteveWilkes Nov 3, 2017
4f305c9
Extending basic projection test
SteveWilkes Nov 3, 2017
3f53b48
Start of simple type conversion test coverage
SteveWilkes Nov 3, 2017
77ac5cf
Using ExpressionEvaluation for comparisons of fallback datasource values
SteveWilkes Nov 4, 2017
23c08cb
Reducing indirection in member population + size of IDataSource inter…
SteveWilkes Nov 4, 2017
dfdf604
Moving MapperData property from MemberPopulation into DataSourceSet
SteveWilkes Nov 4, 2017
7cfcb23
Support for string-to-bool projection with case-sensitive 'true' matc…
SteveWilkes Nov 4, 2017
5052ea3
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Nov 5, 2017
734c34d
Replacing case-insensitive string.Equals with stirng.ToLower == in qu…
SteveWilkes Nov 5, 2017
6fce67d
Start of support for projecting to ints
SteveWilkes Nov 5, 2017
23fab82
Test coverage for projecting longs to ints
SteveWilkes Nov 5, 2017
11d7083
Adding Entity Framework 5 test project / Moving ORM tests to shared p…
SteveWilkes Nov 9, 2017
f9af5f3
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Nov 9, 2017
6ccd6b5
Removing quoted lambda comments from mapping plans
SteveWilkes Nov 10, 2017
984f1df
Giving up on attempting to get a working string -> int conversion for…
SteveWilkes Nov 10, 2017
5601610
Adding EFCore2 tests project / Moving test projects into 'Orms' names…
SteveWilkes Nov 10, 2017
35ae21a
Extending EFCore2 test coverage
SteveWilkes Nov 10, 2017
d789770
Using ORM provider-specific settings to tweak query projections
SteveWilkes Nov 10, 2017
31de56d
Organising QueryProvider settings classes / Start of test coverage fo…
SteveWilkes Nov 11, 2017
5d0bc48
Switching test projects to unit test project types - nice icons :)
SteveWilkes Nov 11, 2017
0d16d2f
Deferentiating between in-memory and local db ORM test contexts / EF5…
SteveWilkes Nov 11, 2017
482f859
Genericising local db context / Switching to typed test contexts
SteveWilkes Nov 11, 2017
3b3a397
Simplifying bool -> string conversion / Test coverage for bool -> str…
SteveWilkes Nov 11, 2017
78a22b0
Updating EF5 integration tests project assembly info
SteveWilkes Nov 11, 2017
8fbf4d2
Adding EfCore1 unit tests project
SteveWilkes Nov 11, 2017
915a3f4
Updating NuGet package versions
SteveWilkes Nov 11, 2017
8f13b7e
Revert "Updating NuGet package versions"
SteveWilkes Nov 11, 2017
4993acc
Updating NuGet package versions - 1
SteveWilkes Nov 11, 2017
4cefef5
Updating NuGet package versions - 2
SteveWilkes Nov 11, 2017
af11d97
Updating NuGet package versions - 3
SteveWilkes Nov 11, 2017
a17f0e8
Updating NuGet package versions - 4
SteveWilkes Nov 11, 2017
a7e2c38
Consolidating NETStandard.Library package versions
SteveWilkes Nov 11, 2017
d2f2f15
Support for string -> DateTime conversion / Adding EF6 integration te…
SteveWilkes Nov 11, 2017
191cd38
Reusing EF5 and EF6 unit test classes in corresponding integration te…
SteveWilkes Nov 11, 2017
5b9c98b
Removing Shouldly package where not needed
SteveWilkes Nov 12, 2017
f8dbbd7
Fixing date time integration tests
SteveWilkes Nov 12, 2017
426eb5f
Test coverage for in-memory EF5 and EF6 string -> datetime conversion
SteveWilkes Nov 12, 2017
46c31d7
Handling null strings in string -> datetime conversions
SteveWilkes Nov 12, 2017
b5cd537
Moving integration test projects to UnitTests.*.*LocalDb
SteveWilkes Nov 12, 2017
c58a019
Guarding string -> DateTime projection in EF5 + EF6 using SqlFunction…
SteveWilkes Nov 12, 2017
d166c73
Adding Include() wrappers to IDbSetWrapper
SteveWilkes Nov 12, 2017
916804f
Support for passing a particular mapper to a projection / Start of te…
SteveWilkes Nov 13, 2017
e0fa34c
Test coverage for a simple flattening projection / Maintaining member…
SteveWilkes Nov 13, 2017
9d462fc
Test coverage for simple navigation property mapping in EF5 + EF6 / S…
SteveWilkes Nov 14, 2017
55b80d6
Skipping projection null-member guarding as it's handled by the provi…
SteveWilkes Nov 14, 2017
571de74
Support for string -> Guid projection in EF Core
SteveWilkes Nov 15, 2017
9215986
Handling null strings in EF Core string -> Guid projections
SteveWilkes Nov 15, 2017
9d2ee60
Tidying
SteveWilkes Nov 15, 2017
4d7ce40
Reorganising DateTime projection tests to get clear test names
SteveWilkes Nov 17, 2017
20b1293
Reorganising guid projection tests to get clearer test names
SteveWilkes Nov 17, 2017
68fb9ee
Organising string -> int projection tests to get clear test names
SteveWilkes Nov 18, 2017
dcea835
Reorganising simple type projection tests to use generic interfaces
SteveWilkes Nov 18, 2017
e605086
Test coverage for -> double projection
SteveWilkes Nov 18, 2017
f9702a2
Simplifying complex type member projection test / Start of collection…
SteveWilkes Nov 18, 2017
2ec8bf4
Complex type enumerable member projection - working in EF6, EF5 can't…
SteveWilkes Nov 18, 2017
51d3822
Comple type enumerable member projection supported in EF6 + EF Core, …
SteveWilkes Nov 18, 2017
ad5ebb5
Reverting element mapping data creation check
SteveWilkes Nov 18, 2017
a1c96ce
Removing pointless type argument from simple type conversion test int…
SteveWilkes Nov 18, 2017
bf426b9
Introducing collection projection test interfaces as EF5 just can't d…
SteveWilkes Nov 18, 2017
d32779b
Merging from master
SteveWilkes Nov 22, 2017
2390c4c
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Nov 23, 2017
ac6a954
Test coverage for projecting to a nested complex type Enumerable - EF…
SteveWilkes Nov 23, 2017
fdda5e1
Support for projecting to IEnumerables - Ef5 + EF6 passing tests
SteveWilkes Nov 24, 2017
f10ef92
Excluding mapping plan comments from non mapping plan expressions / A…
SteveWilkes Nov 24, 2017
d08f38d
Support for generating projection mapping plans!
SteveWilkes Nov 24, 2017
d92d40f
Fixing projection mapping plan caching
SteveWilkes Nov 25, 2017
87b141b
Generating query provider type-specific mapping plans
SteveWilkes Nov 25, 2017
206af9b
Test coverage for projection query mapping plan caching in EF Core 1
SteveWilkes Nov 25, 2017
97e377a
Updating query projection plan caching to use an example IQueryable i…
SteveWilkes Nov 25, 2017
2938210
Test coverage for inclusion of query projection mapping plans in resu…
SteveWilkes Nov 25, 2017
5e7c5d1
Updating to latest version of System.Security.Cryptography.X509Certif…
SteveWilkes Nov 25, 2017
71fc643
Updating to latest version of System.Security.Cryptography.Algorithms
SteveWilkes Nov 25, 2017
ed48c1c
Updating to latest version of System.Net.Http
SteveWilkes Nov 25, 2017
d2be746
Updating to latest version of xunit.analyzers
SteveWilkes Nov 25, 2017
608f6e2
Updating to latest version of Microsoft.NETCore.Platforms
SteveWilkes Nov 25, 2017
94cc2a1
Extending use of Expression.GetConversionTo<T>()
SteveWilkes Nov 25, 2017
b42b9a8
Support for projecting types with one-to-one circular relationships -…
SteveWilkes Nov 26, 2017
3d73765
Test coverage for one-to-one circular relationship projection in EF C…
SteveWilkes Nov 26, 2017
8b99b59
Test coverage for one-to-many circular relationship projection - EF C…
SteveWilkes Nov 26, 2017
a7577f9
Using GetValueOrDefault and skipping null check when mapping from nul…
SteveWilkes Nov 28, 2017
d7aa92b
Populating short-circuited recursive members with empty collections -…
SteveWilkes Nov 28, 2017
4cb2d5e
Organising query projection converters
SteveWilkes Nov 28, 2017
5b686b0
Moving recursion management into a rule set strategy / Fixing EF5 loc…
SteveWilkes Nov 29, 2017
686cc6b
Updating EF5 + EF6 tests to expect failure projecting a one-to-many r…
SteveWilkes Nov 29, 2017
c1f7800
Simplifying projection recursion strategy
SteveWilkes Nov 30, 2017
e1b1cb8
Merging from master
SteveWilkes Dec 3, 2017
fb061df
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Dec 3, 2017
f7cc8bc
Merging from master, update LocalDb projects' NetStandardPolyfills to…
SteveWilkes Dec 5, 2017
f4ffe80
Merging from master
SteveWilkes Dec 20, 2017
b05ef7f
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Dec 20, 2017
73b7394
Updating to NetStandardPolyfills v1.2.1
SteveWilkes Dec 20, 2017
a25f7db
Merging from master - MoreTestClasses won't build because of Serializ…
SteveWilkes Dec 21, 2017
0be2015
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Dec 21, 2017
e82b4f6
Adding Queryable.Linq package to .NET Standard 1.3 target / Readding …
SteveWilkes Dec 21, 2017
38d61f3
Merging from master
SteveWilkes Jan 10, 2018
cc8defa
Merging from master
SteveWilkes Jan 10, 2018
5a8c34f
Merging from master
SteveWilkes Jan 11, 2018
1f18125
Merging from master
SteveWilkes Jan 28, 2018
c0a63c2
Merging from master
SteveWilkes Jan 29, 2018
0651e57
Updating project description
SteveWilkes Jan 30, 2018
d39c312
Merging from master
SteveWilkes Feb 2, 2018
56f0205
Differentiating between GetNewInstanceCreation and GetEmptyInstanceCr…
SteveWilkes Feb 2, 2018
53c8b10
Merging from master
SteveWilkes Feb 2, 2018
8481c6d
Organising one-to-many circular references test
SteveWilkes Feb 3, 2018
b89bad9
Removing Shouldly use from ORM tests
SteveWilkes Feb 3, 2018
b79b42b
Switching to typed-Queryable Project().To() extension method to suppo…
SteveWilkes Feb 3, 2018
aaf7dbb
Start of support for inline query projection configuration
SteveWilkes Feb 3, 2018
0d4bb73
Fixing conversion of GetValueOrDefault() calls for EF5 + EF6 / Start …
SteveWilkes Feb 3, 2018
c9f80b9
Updating project-to-complex-type-member ORM tests to actually project…
SteveWilkes Feb 3, 2018
a191447
Conditionally populating complex type members in EF Core based on sib…
SteveWilkes Feb 3, 2018
b6b5501
Fixing complex type null-checking in ORM tests
SteveWilkes Feb 4, 2018
b6386a4
Ensuring nested enumerables are materialised where possible / Optimis…
SteveWilkes Feb 4, 2018
8c3e547
Tidying
SteveWilkes Feb 4, 2018
4d9f57b
EF Core 2 test coverage for projection to 2nd-recursion-depth / EF Co…
SteveWilkes Feb 4, 2018
5f6da65
Organising enumerable member projection tests
SteveWilkes Feb 4, 2018
4801598
Test coverage for entity flattening projection
SteveWilkes Feb 4, 2018
37849da
Updating ORM tests to async, switching to async operations where avai…
SteveWilkes Feb 4, 2018
f2c0352
Test coverage for default recursive projection behaviour / Completing…
SteveWilkes Feb 4, 2018
850a5bc
Removing explicit zeroeth-depth ORM recursion tests
SteveWilkes Feb 4, 2018
e7a7811
Start of ORM configuration tests
SteveWilkes Feb 5, 2018
a3b2956
Moving mapper specification from To() to Project()
SteveWilkes Feb 5, 2018
65d9d59
Constant value configuration tests for EFCore1, EF5 and EF6
SteveWilkes Feb 5, 2018
3e2618b
Support for conditional configured data sources in query projection
SteveWilkes Feb 5, 2018
e3203b2
Replacing projection mapper specifier with ProjectUsing() method
SteveWilkes Feb 5, 2018
2d9ad4a
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 5, 2018
2284e7f
Test coverage for mapping a configured constant to a nested projectio…
SteveWilkes Feb 5, 2018
c587ed2
Support for configuring custom source members for query projections
SteveWilkes Feb 5, 2018
47c339c
Support for projection-specific config continuations in projection co…
SteveWilkes Feb 5, 2018
c56ad8d
Test coverage for conditional custom source members in projections
SteveWilkes Feb 5, 2018
61a28d1
Test coverage for alternative custom data sources when projecting
SteveWilkes Feb 5, 2018
f5c7a55
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 5, 2018
95231c1
Removing conversion of DefaultExpressions to constants where ORM supp…
SteveWilkes Feb 5, 2018
5667e16
Merging from master
SteveWilkes Feb 6, 2018
82cbb0a
Test coverage for mapper divergence in projection
SteveWilkes Feb 6, 2018
6a816d2
Expanding custom data source test coverage / Providing a workaround f…
SteveWilkes Feb 6, 2018
1c3a351
Adding EFCore2.NetCore2 test project / Organising EFCore test project…
SteveWilkes Feb 6, 2018
0748cbc
Start of support for configuring projection member ignores
SteveWilkes Feb 7, 2018
7b35be1
Skipping EFCore complex type to null comparison conversions when ther…
SteveWilkes Feb 7, 2018
8f90f5d
Start of conditional projection ignore support
SteveWilkes Feb 7, 2018
4e113b2
Merging from master
SteveWilkes Feb 7, 2018
f0c6c3e
Support for conditional projection result member ignores
SteveWilkes Feb 7, 2018
150a86b
Support for PropertyInfo match ignores in projections
SteveWilkes Feb 7, 2018
10c9921
Support for ignoring target members by type in projections / Extendin…
SteveWilkes Feb 7, 2018
a109a09
Refactoring member population expression generation into ruleset-spec…
SteveWilkes Feb 7, 2018
40667d9
Filtering get- and set-method use out of query projections
SteveWilkes Feb 7, 2018
1e0e7ea
Test coverage for projecting to structs with an explicit constructor
SteveWilkes Feb 7, 2018
17a49e6
Start of support for configuring projection constructor parameters by…
SteveWilkes Feb 7, 2018
de8521a
Support for configuring projection constructor parameters by name
SteveWilkes Feb 7, 2018
eb11c2c
Start of projection enum pairing / Organising projection configuratio…
SteveWilkes Feb 8, 2018
725ec2d
Merging from master
SteveWilkes Feb 8, 2018
e3d2f62
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 8, 2018
2c547e9
Refining enum pairing behaviour / Tweaking enum pairing documentation
SteveWilkes Feb 8, 2018
3d07a92
Ensuring string constant values are converted to lower case when conv…
SteveWilkes Feb 8, 2018
5c0e7f7
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 9, 2018
04551a7
Merging from master
SteveWilkes Feb 9, 2018
7dac067
Start of projection validation support + tests
SteveWilkes Feb 9, 2018
99f6a3f
Test coverage for projection unmapped member validation
SteveWilkes Feb 9, 2018
7e3afc0
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 9, 2018
0ba2ad4
Start to to-enum conversion tests + support
SteveWilkes Feb 10, 2018
6e9f0d4
Merge branch 'master' into QueryableSupportEntityFramework
SteveWilkes Feb 10, 2018
749b081
Extending stirng-to-enum projection test coverage
SteveWilkes Feb 10, 2018
f627f78
Supporting EF5 + EF6 Canonical and Sql Functions in .NET Standard
SteveWilkes Feb 10, 2018
189612d
Support for converting strings to enums in EF6 + EF5 / Adding legacy …
SteveWilkes Feb 10, 2018
a6dd3a6
Extending mapping validation test coverage
SteveWilkes Feb 10, 2018
e8cfd56
Start of support for derived types configuration
SteveWilkes Feb 10, 2018
960fe3a
Refactoring derived type mapping projection
SteveWilkes Feb 11, 2018
4a19bb6
Expanding derived type test coverage
SteveWilkes Feb 11, 2018
f4a5415
Support for projecting source types which have derived types / Suppor…
SteveWilkes Feb 11, 2018
dd56d16
Support for cached query projectors and mappers in the same mapper
SteveWilkes Feb 11, 2018
f92a0d8
Merging from master
SteveWilkes Feb 12, 2018
7da177d
Extending derived type testing
SteveWilkes Feb 12, 2018
67c5c84
Ignoring configured callbacks when projecting / Reinstating convertin…
SteveWilkes Feb 12, 2018
d0ac413
Merging from master
SteveWilkes Feb 12, 2018
589d7ec
Expanding projections + callbacks tests
SteveWilkes Feb 13, 2018
20fb65d
Moving callback tests to EFCore-only / Test coverage for object track…
SteveWilkes Feb 13, 2018
520a233
Start of support for custom object factories in projections
SteveWilkes Feb 13, 2018
47d40ba
Support for custom factories for projections of objects of a specifie…
SteveWilkes Feb 13, 2018
da417c1
Test coverage for conditional object factories in projections
SteveWilkes Feb 13, 2018
f5c76a6
Expanding test coverage for custom projection object factories
SteveWilkes Feb 13, 2018
e48e1d8
Support for configurable project to null conditions
SteveWilkes Feb 13, 2018
bd6a9be
Increasing use of RunTest(context, mapper ) overload
SteveWilkes Feb 13, 2018
8355dd4
Extending test coverage for project-to-null configuration
SteveWilkes Feb 13, 2018
ed2cd10
Start of string-formatting projection tests
SteveWilkes Feb 13, 2018
762b78e
Support for DateTime -> String conversion
SteveWilkes Feb 13, 2018
3e5b199
Support for configured string formatting
SteveWilkes Feb 13, 2018
f88e6a0
Test coverage + support for decimal -> formatted string projection
SteveWilkes Feb 13, 2018
8dd32f7
Test coverage for double -> string projections
SteveWilkes Feb 14, 2018
728c274
Test coverage for decimal -> int, double -> int and double -> string …
SteveWilkes Feb 14, 2018
7ec8fda
Test coverage for projection with global exception swalling configured
SteveWilkes Feb 14, 2018
575b2ba
Test coverage for projection use of custom name matching patterns
SteveWilkes Feb 14, 2018
46f2ec5
Test coverage for inline-configured custom constructor data sources
SteveWilkes Feb 14, 2018
4db27e4
Test coverage for inline member data source configuration
SteveWilkes Feb 14, 2018
66cb17c
Extending test coverage for inline data source configuration / Suppor…
SteveWilkes Feb 14, 2018
f2ce5f9
Test coverage + support for inline-validated projections
SteveWilkes Feb 14, 2018
3c1b7b8
Test coverage and support for 'continued' inline configuration / Test…
SteveWilkes Feb 14, 2018
fbee782
Extending inline projection configuration test coverage
SteveWilkes Feb 14, 2018
cc5a10f
Support for inline projection naming patterns / Test coverage for con…
SteveWilkes Feb 14, 2018
232d2c1
Organising project-to-enumerable tests
SteveWilkes Feb 15, 2018
9495179
Differentiating assembly-loading in .NET Standard
SteveWilkes Feb 15, 2018
7c1e715
Test coverage for projection via a linking type in Ef Core 1+ 2
SteveWilkes Feb 15, 2018
15285a4
Test coverage for projection via a linking type in EF5 + EF6
SteveWilkes Feb 15, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
<RootNamespace>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
</ItemGroup>

</Project>
26 changes: 26 additions & 0 deletions AgileMapper.UnitTests.MoreTestClasses/MappingExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace AgileObjects.AgileMapper.UnitTests.MoreTestClasses
{
using System;
using System.Collections.Generic;
using System.Linq;

public static class MappingExtensions
{
public static object RootMapperCountShouldBeOne(this IMapper mapper)
{
return RootMapperCountShouldBe(mapper, 1).First();
}

public static ICollection<object> RootMapperCountShouldBe(this IMapper mapper, int expected)
{
var rootMappers = ((Mapper)mapper).Context.ObjectMapperFactory.RootMappers.ToArray();

if (rootMappers.Length == expected)
{
return rootMappers;
}

throw new Exception($"Expected {expected} mappers, got {rootMappers.Length}");
}
}
}
4 changes: 4 additions & 0 deletions AgileMapper.UnitTests.MoreTestClasses/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Shouldly" version="2.8.3" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
Expand All @@ -14,6 +14,9 @@
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NonParallel</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand Down Expand Up @@ -100,9 +103,6 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\xunit.analyzers.0.7.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion AgileMapper.UnitTests.NonParallel/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Shouldly" version="2.8.3" targetFramework="net461" />
<package id="xunit" version="2.3.1" targetFramework="net461" />
<package id="xunit.abstractions" version="2.0.1" targetFramework="net461" />
<package id="xunit.analyzers" version="0.7.0" targetFramework="net461" />
<package id="xunit.analyzers" version="0.8.0" targetFramework="net461" />
<package id="xunit.assert" version="2.3.1" targetFramework="net461" />
<package id="xunit.core" version="2.3.1" targetFramework="net461" />
<package id="xunit.extensibility.core" version="2.3.1" targetFramework="net461" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AgileMapper.UnitTests.Orms\AgileMapper.UnitTests.Orms.csproj" />
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\AgileMapper.UnitTests.Orms.EfCore2\**\*.cs" Exclude="..\AgileMapper.UnitTests.Orms.EfCore2\obj\**\*.cs;">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<Compile Remove="..\AgileMapper.UnitTests.Orms.EfCore2\Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\VersionInfo.cs" Link="Properties\VersionInfo.cs" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{48B855A9-F42C-4D2A-9549-97ED27D59336}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb</RootNamespace>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\AgileMapper.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="AgileObjects.NetStandardPolyfills, Version=1.3.0.0, Culture=neutral, PublicKeyToken=06131ac1c008ad4e, processorArchitecture=MSIL">
<HintPath>..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\VersionInfo.cs">
<Link>VersionInfo.cs</Link>
</Compile>
<Compile Include="Configuration\WhenConfiguringDataSources.cs" />
<Compile Include="Configuration\WhenConfiguringStringFormatting.cs" />
<Compile Include="Infrastructure\Ef5TestLocalDbContext.cs" />
<Compile Include="Infrastructure\Ef5TestLocalDbDefinition.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SimpleTypeConversion\WhenConvertingToDateTimes.cs" />
<Compile Include="SimpleTypeConversion\WhenConvertingToEnums.cs" />
<Compile Include="SimpleTypeConversion\WhenConvertingToStrings.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AgileMapper.UnitTests.Orms.Ef5\AgileMapper.UnitTests.Orms.Ef5.csproj">
<Project>{d87103fd-3851-4724-bd8f-9cef19c8f193}</Project>
<Name>AgileMapper.UnitTests.Orms.Ef5</Name>
</ProjectReference>
<ProjectReference Include="..\AgileMapper.UnitTests.Orms\AgileMapper.UnitTests.Orms.csproj">
<Project>{66522d44-19f5-4af5-9d43-483a3cd6f958}</Project>
<Name>AgileMapper.UnitTests.Orms</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.targets'))" />
</Target>
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
</Project>
22 changes: 22 additions & 0 deletions AgileMapper.UnitTests.Orms.Ef5.LocalDb/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb.Configuration
{
using System.Threading.Tasks;
using Infrastructure;
using Orms.Configuration;
using Orms.Infrastructure;
using Xunit;

public class WhenConfiguringDataSources : WhenConfiguringDataSources<Ef5TestLocalDbContext>
{
public WhenConfiguringDataSources(LocalDbTestContext<Ef5TestLocalDbContext> context)
: base(context)
{
}

// Executed in LocalDb because the configured conditions require string conversions

[Fact]
public Task ShouldApplyAConfiguredMember() => DoShouldApplyAConfiguredMember();

[Fact]
public Task ShouldApplyMultipleConfiguredMembers() => DoShouldApplyMultipleConfiguredMembers();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb.Configuration
{
using System.Threading.Tasks;
using Infrastructure;
using Orms.Configuration;
using Orms.Infrastructure;
using Xunit;

public class WhenConfiguringStringFormatting : WhenConfiguringStringFormatting<Ef5TestLocalDbContext>
{
public WhenConfiguringStringFormatting(LocalDbTestContext<Ef5TestLocalDbContext> context)
: base(context)
{
}

[Fact]
public Task ShouldFormatDateTimes()
=> DoShouldFormatDateTimes(d => d.ToString("yyyy-%M-%d %H:%m:%s"));

[Fact]
public Task ShouldFormatDecimals() => DoShouldFormatDecimals(d => d.ToString(".000000"));

[Fact]
public Task ShouldFormatDoubles() => DoShouldFormatDoubles(d => d.ToString(".000000"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb.Infrastructure
{
using System.Data.SqlClient;
using Ef5.Infrastructure;
using Orms;
using Orms.Infrastructure;

public class Ef5TestLocalDbContext : Ef5TestDbContext, ITestLocalDbContext
{
public Ef5TestLocalDbContext()
: base(new SqlConnection(TestConstants.GetLocalDbConnectionString<Ef5TestLocalDbContext>()))
{
}

void ITestLocalDbContext.CreateDatabase() => Database.Create();

void ITestLocalDbContext.DeleteDatabase() => Database.Delete();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb.Infrastructure
{
using Orms;
using Orms.Infrastructure;
using Xunit;

[CollectionDefinition(TestConstants.OrmCollectionName)]
public class Ef5TestLocalDbDefinition : ICollectionFixture<LocalDbTestContext<Ef5TestLocalDbContext>>
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb")]
[assembly: AssemblyDescription("AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb")]

[assembly: ComVisible(false)]
Loading