Skip to content

Commit 0c90c79

Browse files
authored
Queryable support entity framework (#53)
* Initial EF6 test project, test and public ProjectTo extension method * Building a Queryable.Select statement for queryable projection / Using singleton instances for stateless mapping expression factories * Making mapping try - catch use ruleset-dependent * Making source element null-checking ruleset-dependent * Making use of member initialisation object creations ruleset-dependent * Support for straightforward projection! * Using a mapper-scoped projection MappingContext * Extending basic projection test * Start of simple type conversion test coverage * Using ExpressionEvaluation for comparisons of fallback datasource values * Reducing indirection in member population + size of IDataSource interface * Moving MapperData property from MemberPopulation into DataSourceSet * Support for string-to-bool projection with case-sensitive 'true' matching * Replacing case-insensitive string.Equals with stirng.ToLower == in query projections * Start of support for projecting to ints * Test coverage for projecting longs to ints * Adding Entity Framework 5 test project / Moving ORM tests to shared project * Removing quoted lambda comments from mapping plans * Giving up on attempting to get a working string -> int conversion for code-first EF5 and EF6 * Adding EFCore2 tests project / Moving test projects into 'Orms' namespace * Extending EFCore2 test coverage * Using ORM provider-specific settings to tweak query projections * Organising QueryProvider settings classes / Start of test coverage for to-string conversions * Switching test projects to unit test project types - nice icons :) * Deferentiating between in-memory and local db ORM test contexts / EF5 integration tests project added to enable testing of SqlFunctions.StringConvert calls * Genericising local db context / Switching to typed test contexts * Simplifying bool -> string conversion / Test coverage for bool -> string projection * Updating EF5 integration tests project assembly info * Adding EfCore1 unit tests project * Updating NuGet package versions * Revert "Updating NuGet package versions" This reverts commit 915a3f4. * Updating NuGet package versions - 1 * Updating NuGet package versions - 2 * Updating NuGet package versions - 3 * Updating NuGet package versions - 4 * Consolidating NETStandard.Library package versions * Support for string -> DateTime conversion / Adding EF6 integration tests project * Reusing EF5 and EF6 unit test classes in corresponding integration test projects * Removing Shouldly package where not needed * Fixing date time integration tests * Test coverage for in-memory EF5 and EF6 string -> datetime conversion * Handling null strings in string -> datetime conversions * Moving integration test projects to UnitTests.*.*LocalDb * Guarding string -> DateTime projection in EF5 + EF6 using SqlFunctions.IsDate * Adding Include() wrappers to IDbSetWrapper * Support for passing a particular mapper to a projection / Start of test coverage for projection mapper caching * Test coverage for a simple flattening projection / Maintaining member population order when mapping to member binndings * Test coverage for simple navigation property mapping in EF5 + EF6 / Short-circuiting default expression conversion for non-value types * Skipping projection null-member guarding as it's handled by the provider! * Support for string -> Guid projection in EF Core * Handling null strings in EF Core string -> Guid projections * Tidying * Reorganising DateTime projection tests to get clear test names * Reorganising guid projection tests to get clearer test names * Organising string -> int projection tests to get clear test names * Reorganising simple type projection tests to use generic interfaces * Test coverage for -> double projection * Simplifying complex type member projection test / Start of collection member support * Complex type enumerable member projection - working in EF6, EF5 can't use ToList(), EF Core can't use AsQueryable() * Comple type enumerable member projection supported in EF6 + EF Core, EF5 can't use ToList * Reverting element mapping data creation check * Removing pointless type argument from simple type conversion test interfaces * Introducing collection projection test interfaces as EF5 just can't do ToList * Test coverage for projecting to a nested complex type Enumerable - EF Core 1+ 2 covered * Support for projecting to IEnumerables - Ef5 + EF6 passing tests * Excluding mapping plan comments from non mapping plan expressions / All-ORM test coverage for projecting to unmapped members * Support for generating projection mapping plans! * Fixing projection mapping plan caching * Generating query provider type-specific mapping plans * Test coverage for projection query mapping plan caching in EF Core 1 * Updating query projection plan caching to use an example IQueryable instance and a dedicated GetPlanForProjecting() method instead of having the user explicitly supply the IQueryProvider / Mapping plan viewing and caching tests passing for all EF versions * Test coverage for inclusion of query projection mapping plans in result of GetPlansInCache() * Updating to latest version of System.Security.Cryptography.X509Certificates * Updating to latest version of System.Security.Cryptography.Algorithms * Updating to latest version of System.Net.Http * Updating to latest version of xunit.analyzers * Updating to latest version of Microsoft.NETCore.Platforms * Extending use of Expression.GetConversionTo<T>() * Support for projecting types with one-to-one circular relationships - EF Core 2 test passing / Extending use of NetStandardPolyfills GetPublicInstanceMethod * Test coverage for one-to-one circular relationship projection in EF Core 1, Ef5 + EF6 * Test coverage for one-to-many circular relationship projection - EF Core 1 + 2 tests passing, EF5 + EF6 not * Using GetValueOrDefault and skipping null check when mapping from nullable T to T * Populating short-circuited recursive members with empty collections - working in EF Core, not in EF 5 + 6 * Organising query projection converters * Moving recursion management into a rule set strategy / Fixing EF5 local DB int -> ToString projection * Updating EF5 + EF6 tests to expect failure projecting a one-to-many recursive relationship * Simplifying projection recursion strategy * Updating to NetStandardPolyfills v1.2.1 * Adding Queryable.Linq package to .NET Standard 1.3 target / Readding missing file * Updating project description * Differentiating between GetNewInstanceCreation and GetEmptyInstanceCreation for enumerables / Reusing EnumerableTypeHelper when creating empty enumerable instances where possible * Organising one-to-many circular references test * Removing Shouldly use from ORM tests * Switching to typed-Queryable Project().To() extension method to support typed configuration * Start of support for inline query projection configuration * Fixing conversion of GetValueOrDefault() calls for EF5 + EF6 / Start of support for depth-specific recursive member projection * Updating project-to-complex-type-member ORM tests to actually project to a complex type member / Adding in-query null checks to nested complex type members * Conditionally populating complex type members in EF Core based on sibling member id value, re: bug comparing navigation properties to null * Fixing complex type null-checking in ORM tests * Ensuring nested enumerables are materialised where possible / Optimising ExpressionExtensions initialisation * Tidying * EF Core 2 test coverage for projection to 2nd-recursion-depth / EF Core 1 test coverage for projection to 1st and 2nd recursion depth * Organising enumerable member projection tests * Test coverage for entity flattening projection * Updating ORM tests to async, switching to async operations where available * Test coverage for default recursive projection behaviour / Completing ORM tests' async conversion * Removing explicit zeroeth-depth ORM recursion tests * Start of ORM configuration tests * Moving mapper specification from To() to Project() * Constant value configuration tests for EFCore1, EF5 and EF6 * Support for conditional configured data sources in query projection * Replacing projection mapper specifier with ProjectUsing() method * Test coverage for mapping a configured constant to a nested projection result member * Support for configuring custom source members for query projections * Support for projection-specific config continuations in projection configuration * Test coverage for conditional custom source members in projections * Test coverage for alternative custom data sources when projecting * Removing conversion of DefaultExpressions to constants where ORM supports DefaultExpressions / Fixing MapFunc() implementation * Test coverage for mapper divergence in projection * Expanding custom data source test coverage / Providing a workaround for EF5 + EF6 not supporting all primitive constants * Adding EFCore2.NetCore2 test project / Organising EFCore test project version number sharing * Start of support for configuring projection member ignores * Skipping EFCore complex type to null comparison conversions when there's no complex type id available * Start of conditional projection ignore support * Support for conditional projection result member ignores * Support for PropertyInfo match ignores in projections * Support for ignoring target members by type in projections / Extending ignore member tests to EF5, EF6 + Ef Core 1 * Refactoring member population expression generation into ruleset-specific class, replacing population guarding strategies * Filtering get- and set-method use out of query projections * Test coverage for projecting to structs with an explicit constructor * Start of support for configuring projection constructor parameters by type / Organising custom projection data source tests * Support for configuring projection constructor parameters by name * Start of projection enum pairing / Organising projection configuration API interfaces / Support for using string operators to map to bools and enums * Ensuring string constant values are converted to lower case when converting ignore case string comparisons / Extending test enum-pairing coverage to EF5, EF6 + EF Core 1 / Tweaking DbSetWrapper implementations * Start of projection validation support + tests * Test coverage for projection unmapped member validation * Start to to-enum conversion tests + support * Extending stirng-to-enum projection test coverage * Supporting EF5 + EF6 Canonical and Sql Functions in .NET Standard * Support for converting strings to enums in EF6 + EF5 / Adding legacy EF base settings class * Extending mapping validation test coverage * Start of support for derived types configuration * Refactoring derived type mapping projection * Expanding derived type test coverage * Support for projecting source types which have derived types / Support for creation of mappers and projectors for the same types * Support for cached query projectors and mappers in the same mapper * Extending derived type testing * Ignoring configured callbacks when projecting / Reinstating converting default expressions to null constants as EF Core doesn't implement comparing default expressions * Expanding projections + callbacks tests * Moving callback tests to EFCore-only / Test coverage for object tracking + projection * Start of support for custom object factories in projections * Support for custom factories for projections of objects of a specified type * Test coverage for conditional object factories in projections * Expanding test coverage for custom projection object factories * Support for configurable project to null conditions * Increasing use of RunTest(context, mapper ) overload * Extending test coverage for project-to-null configuration * Start of string-formatting projection tests * Support for DateTime -> String conversion * Support for configured string formatting * Test coverage + support for decimal -> formatted string projection * Test coverage for double -> string projections * Test coverage for decimal -> int, double -> int and double -> string projection * Test coverage for projection with global exception swalling configured * Test coverage for projection use of custom name matching patterns * Test coverage for inline-configured custom constructor data sources * Test coverage for inline member data source configuration * Extending test coverage for inline data source configuration / Support for switching configuration types inline in projections * Test coverage + support for inline-validated projections * Test coverage and support for 'continued' inline configuration / Test coverage for inline configuration of decimal -> string formatting * Extending inline projection configuration test coverage * Support for inline projection naming patterns / Test coverage for configured map-to-null projections * Organising project-to-enumerable tests * Differentiating assembly-loading in .NET Standard * Test coverage for projection via a linking type in Ef Core 1+ 2 * Test coverage for projection via a linking type in EF5 + EF6
1 parent 6beb151 commit 0c90c79

File tree

437 files changed

+14516
-1593
lines changed

Some content is hidden

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

437 files changed

+14516
-1593
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
<RootNamespace>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</RootNamespace>
88
</PropertyGroup>
99

10+
<ItemGroup>
11+
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
12+
</ItemGroup>
13+
1014
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace AgileObjects.AgileMapper.UnitTests.MoreTestClasses
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
7+
public static class MappingExtensions
8+
{
9+
public static object RootMapperCountShouldBeOne(this IMapper mapper)
10+
{
11+
return RootMapperCountShouldBe(mapper, 1).First();
12+
}
13+
14+
public static ICollection<object> RootMapperCountShouldBe(this IMapper mapper, int expected)
15+
{
16+
var rootMappers = ((Mapper)mapper).Context.ObjectMapperFactory.RootMappers.ToArray();
17+
18+
if (rootMappers.Length == expected)
19+
{
20+
return rootMappers;
21+
}
22+
23+
throw new Exception($"Expected {expected} mappers, got {rootMappers.Length}");
24+
}
25+
}
26+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Shouldly" version="2.8.3" targetFramework="net40" />
4+
</packages>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2</AssemblyName>
88
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2</PackageId>
99
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
10-
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
10+
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
1313
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<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')" />
44
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
55
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
@@ -14,6 +14,9 @@
1414
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NonParallel</AssemblyName>
1515
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1616
<FileAlignment>512</FileAlignment>
17+
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
18+
<IsCodedUITest>False</IsCodedUITest>
19+
<TestProjectType>UnitTest</TestProjectType>
1720
<TargetFrameworkProfile />
1821
<NuGetPackageImportStamp>
1922
</NuGetPackageImportStamp>
@@ -100,9 +103,6 @@
100103
<ItemGroup>
101104
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
102105
</ItemGroup>
103-
<ItemGroup>
104-
<Analyzer Include="..\packages\xunit.analyzers.0.7.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
105-
</ItemGroup>
106106
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
107107
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
108108
<PropertyGroup>

AgileMapper.UnitTests.NonParallel/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package id="Shouldly" version="2.8.3" targetFramework="net461" />
44
<package id="xunit" version="2.3.1" targetFramework="net461" />
55
<package id="xunit.abstractions" version="2.0.1" targetFramework="net461" />
6-
<package id="xunit.analyzers" version="0.7.0" targetFramework="net461" />
6+
<package id="xunit.analyzers" version="0.8.0" targetFramework="net461" />
77
<package id="xunit.assert" version="2.3.1" targetFramework="net461" />
88
<package id="xunit.core" version="2.3.1" targetFramework="net461" />
99
<package id="xunit.extensibility.core" version="2.3.1" targetFramework="net461" />
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="..\common.props" />
3+
4+
<PropertyGroup>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7+
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</AssemblyName>
8+
<PackageId>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</PackageId>
9+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
10+
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
11+
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
12+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
14+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
15+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
16+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
17+
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
18+
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</RootNamespace>
19+
</PropertyGroup>
20+
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
22+
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
23+
</PropertyGroup>
24+
25+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
26+
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
27+
</PropertyGroup>
28+
29+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
30+
<PackageReference Include="System.Data.Common" Version="4.3.0" />
31+
</ItemGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.3.0" />
35+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
36+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.0.0" />
37+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
38+
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.0.0" />
39+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
40+
<PackageReference Include="xunit" Version="2.3.1" />
41+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
42+
</ItemGroup>
43+
44+
<ItemGroup>
45+
<ProjectReference Include="..\AgileMapper.UnitTests.Orms\AgileMapper.UnitTests.Orms.csproj" />
46+
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
47+
</ItemGroup>
48+
49+
<ItemGroup>
50+
<Compile Include="..\AgileMapper.UnitTests.Orms.EfCore2\**\*.cs" Exclude="..\AgileMapper.UnitTests.Orms.EfCore2\obj\**\*.cs;">
51+
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
52+
</Compile>
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<Compile Remove="..\AgileMapper.UnitTests.Orms.EfCore2\Properties\AssemblyInfo.cs" />
57+
</ItemGroup>
58+
59+
<ItemGroup>
60+
<Compile Include="..\VersionInfo.cs" Link="Properties\VersionInfo.cs" />
61+
</ItemGroup>
62+
63+
<ItemGroup>
64+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
65+
</ItemGroup>
66+
67+
<ItemGroup>
68+
<Folder Include="Properties\" />
69+
</ItemGroup>
70+
71+
</Project>
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{48B855A9-F42C-4D2A-9549-97ED27D59336}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb</RootNamespace>
12+
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb</AssemblyName>
13+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16+
<IsCodedUITest>False</IsCodedUITest>
17+
<TestProjectType>UnitTest</TestProjectType>
18+
<TargetFrameworkProfile />
19+
<NuGetPackageImportStamp>
20+
</NuGetPackageImportStamp>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23+
<DebugSymbols>true</DebugSymbols>
24+
<DebugType>full</DebugType>
25+
<Optimize>false</Optimize>
26+
<OutputPath>bin\Debug\</OutputPath>
27+
<DefineConstants>DEBUG;TRACE</DefineConstants>
28+
<ErrorReport>prompt</ErrorReport>
29+
<WarningLevel>4</WarningLevel>
30+
<Prefer32Bit>false</Prefer32Bit>
31+
</PropertyGroup>
32+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
33+
<DebugType>pdbonly</DebugType>
34+
<Optimize>true</Optimize>
35+
<OutputPath>bin\Release\</OutputPath>
36+
<DefineConstants>TRACE</DefineConstants>
37+
<ErrorReport>prompt</ErrorReport>
38+
<WarningLevel>4</WarningLevel>
39+
<Prefer32Bit>false</Prefer32Bit>
40+
</PropertyGroup>
41+
<PropertyGroup>
42+
<SignAssembly>true</SignAssembly>
43+
</PropertyGroup>
44+
<PropertyGroup>
45+
<AssemblyOriginatorKeyFile>..\AgileMapper.snk</AssemblyOriginatorKeyFile>
46+
</PropertyGroup>
47+
<ItemGroup>
48+
<Reference Include="AgileObjects.NetStandardPolyfills, Version=1.3.0.0, Culture=neutral, PublicKeyToken=06131ac1c008ad4e, processorArchitecture=MSIL">
49+
<HintPath>..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll</HintPath>
50+
</Reference>
51+
<Reference Include="EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
52+
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
53+
</Reference>
54+
<Reference Include="System" />
55+
<Reference Include="System.ComponentModel.DataAnnotations" />
56+
<Reference Include="System.Core" />
57+
<Reference Include="System.Data.Entity" />
58+
<Reference Include="System.Xml.Linq" />
59+
<Reference Include="System.Data.DataSetExtensions" />
60+
<Reference Include="Microsoft.CSharp" />
61+
<Reference Include="System.Data" />
62+
<Reference Include="System.Xml" />
63+
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
64+
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
65+
</Reference>
66+
<Reference Include="xunit.assert, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
67+
<HintPath>..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
68+
</Reference>
69+
<Reference Include="xunit.core, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
70+
<HintPath>..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
71+
</Reference>
72+
<Reference Include="xunit.execution.desktop, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
73+
<HintPath>..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll</HintPath>
74+
</Reference>
75+
</ItemGroup>
76+
<ItemGroup>
77+
<Compile Include="..\CommonAssemblyInfo.cs">
78+
<Link>CommonAssemblyInfo.cs</Link>
79+
</Compile>
80+
<Compile Include="..\VersionInfo.cs">
81+
<Link>VersionInfo.cs</Link>
82+
</Compile>
83+
<Compile Include="Configuration\WhenConfiguringDataSources.cs" />
84+
<Compile Include="Configuration\WhenConfiguringStringFormatting.cs" />
85+
<Compile Include="Infrastructure\Ef5TestLocalDbContext.cs" />
86+
<Compile Include="Infrastructure\Ef5TestLocalDbDefinition.cs" />
87+
<Compile Include="Properties\AssemblyInfo.cs" />
88+
<Compile Include="SimpleTypeConversion\WhenConvertingToDateTimes.cs" />
89+
<Compile Include="SimpleTypeConversion\WhenConvertingToEnums.cs" />
90+
<Compile Include="SimpleTypeConversion\WhenConvertingToStrings.cs" />
91+
</ItemGroup>
92+
<ItemGroup>
93+
<ProjectReference Include="..\AgileMapper.UnitTests.Orms.Ef5\AgileMapper.UnitTests.Orms.Ef5.csproj">
94+
<Project>{d87103fd-3851-4724-bd8f-9cef19c8f193}</Project>
95+
<Name>AgileMapper.UnitTests.Orms.Ef5</Name>
96+
</ProjectReference>
97+
<ProjectReference Include="..\AgileMapper.UnitTests.Orms\AgileMapper.UnitTests.Orms.csproj">
98+
<Project>{66522d44-19f5-4af5-9d43-483a3cd6f958}</Project>
99+
<Name>AgileMapper.UnitTests.Orms</Name>
100+
</ProjectReference>
101+
</ItemGroup>
102+
<ItemGroup>
103+
<None Include="App.config" />
104+
<None Include="packages.config" />
105+
</ItemGroup>
106+
<ItemGroup />
107+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
108+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
109+
<PropertyGroup>
110+
<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>
111+
</PropertyGroup>
112+
<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'))" />
113+
<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'))" />
114+
</Target>
115+
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
116+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5+
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6+
</configSections>
7+
<entityFramework>
8+
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
9+
<parameters>
10+
<parameter value="v11.0" />
11+
</parameters>
12+
</defaultConnectionFactory>
13+
</entityFramework>
14+
<runtime>
15+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
16+
<dependentAssembly>
17+
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
18+
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
19+
</dependentAssembly>
20+
</assemblyBinding>
21+
</runtime>
22+
</configuration>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
namespace AgileObjects.AgileMapper.UnitTests.Orms.Ef5.LocalDb.Configuration
2+
{
3+
using System.Threading.Tasks;
4+
using Infrastructure;
5+
using Orms.Configuration;
6+
using Orms.Infrastructure;
7+
using Xunit;
8+
9+
public class WhenConfiguringDataSources : WhenConfiguringDataSources<Ef5TestLocalDbContext>
10+
{
11+
public WhenConfiguringDataSources(LocalDbTestContext<Ef5TestLocalDbContext> context)
12+
: base(context)
13+
{
14+
}
15+
16+
// Executed in LocalDb because the configured conditions require string conversions
17+
18+
[Fact]
19+
public Task ShouldApplyAConfiguredMember() => DoShouldApplyAConfiguredMember();
20+
21+
[Fact]
22+
public Task ShouldApplyMultipleConfiguredMembers() => DoShouldApplyMultipleConfiguredMembers();
23+
}
24+
}

0 commit comments

Comments
 (0)