diff --git a/AgileMapper.PerformanceTester/AgileMapper.PerformanceTester.csproj b/AgileMapper.PerformanceTester/AgileMapper.PerformanceTester.csproj
index 774508132..66fda6e37 100644
--- a/AgileMapper.PerformanceTester/AgileMapper.PerformanceTester.csproj
+++ b/AgileMapper.PerformanceTester/AgileMapper.PerformanceTester.csproj
@@ -34,11 +34,11 @@
4
-
- ..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
+
+ ..\packages\AgileObjects.NetStandardPolyfills.1.4.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
-
- ..\packages\AgileObjects.ReadableExpressions.1.11.0\lib\net40\AgileObjects.ReadableExpressions.dll
+
+ ..\packages\AgileObjects.ReadableExpressions.1.12.1\lib\net40\AgileObjects.ReadableExpressions.dll
..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll
diff --git a/AgileMapper.PerformanceTester/App.config b/AgileMapper.PerformanceTester/App.config
index 291327982..b176983b3 100644
--- a/AgileMapper.PerformanceTester/App.config
+++ b/AgileMapper.PerformanceTester/App.config
@@ -7,7 +7,7 @@
-
+
diff --git a/AgileMapper.PerformanceTester/packages.config b/AgileMapper.PerformanceTester/packages.config
index 73ff2151f..6bb5b1c0a 100644
--- a/AgileMapper.PerformanceTester/packages.config
+++ b/AgileMapper.PerformanceTester/packages.config
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/AgileMapper.UnitTests.MoreTestClasses/AgileMapper.UnitTests.MoreTestClasses.csproj b/AgileMapper.UnitTests.MoreTestClasses/AgileMapper.UnitTests.MoreTestClasses.csproj
index a4b214a7a..ef63b0656 100644
--- a/AgileMapper.UnitTests.MoreTestClasses/AgileMapper.UnitTests.MoreTestClasses.csproj
+++ b/AgileMapper.UnitTests.MoreTestClasses/AgileMapper.UnitTests.MoreTestClasses.csproj
@@ -1,8 +1,8 @@
-
+
- netstandard1.0
+ net35;netstandard1.0
AgileObjects.AgileMapper.UnitTests.MoreTestClasses
AgileObjects.AgileMapper.UnitTests.MoreTestClasses
diff --git a/AgileMapper.UnitTests.Net35/AgileMapper.UnitTests.Net35.csproj b/AgileMapper.UnitTests.Net35/AgileMapper.UnitTests.Net35.csproj
new file mode 100644
index 000000000..c7c51c967
--- /dev/null
+++ b/AgileMapper.UnitTests.Net35/AgileMapper.UnitTests.Net35.csproj
@@ -0,0 +1,89 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {E0706509-4A4B-4C0D-A3B2-4A713FFC6ED4}
+ Library
+ Properties
+ AgileObjects.AgileMapper.UnitTests.Net35
+ AgileObjects.AgileMapper.UnitTests.Net35
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;NET35
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE;NET35
+ prompt
+ 4
+
+
+
+ ..\packages\AgileObjects.NetStandardPolyfills.1.4.0\lib\net35\AgileObjects.NetStandardPolyfills.dll
+
+
+ ..\packages\AgileObjects.ReadableExpressions.1.12.1\lib\net35\AgileObjects.ReadableExpressions.dll
+
+
+ ..\packages\DynamicLanguageRuntime.1.1.2\lib\Net35\Microsoft.Dynamic.dll
+
+
+ ..\packages\DynamicLanguageRuntime.1.1.2\lib\Net35\Microsoft.Scripting.dll
+
+
+ ..\packages\DynamicLanguageRuntime.1.1.2\lib\Net35\Microsoft.Scripting.AspNet.dll
+
+
+ ..\packages\DynamicLanguageRuntime.1.1.2\lib\Net35\Microsoft.Scripting.Core.dll
+
+
+ ..\packages\DynamicLanguageRuntime.1.1.2\lib\Net35\Microsoft.Scripting.Metadata.dll
+
+
+ ..\packages\NUnit.3.6.1\lib\net35\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+ %(RecursiveDir)%(Filename)%(Extension)
+
+
+
+
+ Properties\CommonAssemblyInfo.cs
+
+
+
+
+
+
+
+ {0d045f11-1cbb-4be1-b854-d7e5d348c2fe}
+ AgileMapper.UnitTests.MoreTestClasses
+
+
+ {147ddcce-cdd3-4dd0-8ba3-d3f2f239e161}
+ AgileMapper
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Net35/packages.config b/AgileMapper.UnitTests.Net35/packages.config
new file mode 100644
index 000000000..b089d5d31
--- /dev/null
+++ b/AgileMapper.UnitTests.Net35/packages.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.NetCore/AgileMapper.UnitTests.NetCore.csproj b/AgileMapper.UnitTests.NetCore/AgileMapper.UnitTests.NetCore.csproj
index a2c6ab49b..eda1e9913 100644
--- a/AgileMapper.UnitTests.NetCore/AgileMapper.UnitTests.NetCore.csproj
+++ b/AgileMapper.UnitTests.NetCore/AgileMapper.UnitTests.NetCore.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/AgileMapper.UnitTests.NetCore2.1/AgileMapper.UnitTests.NetCore2.1.csproj b/AgileMapper.UnitTests.NetCore2.1/AgileMapper.UnitTests.NetCore2.1.csproj
index e43559c85..7285bfa32 100644
--- a/AgileMapper.UnitTests.NetCore2.1/AgileMapper.UnitTests.NetCore2.1.csproj
+++ b/AgileMapper.UnitTests.NetCore2.1/AgileMapper.UnitTests.NetCore2.1.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/AgileMapper.UnitTests.NetCore2/AgileMapper.UnitTests.NetCore2.csproj b/AgileMapper.UnitTests.NetCore2/AgileMapper.UnitTests.NetCore2.csproj
index 31d66bef0..1e90ad6d2 100644
--- a/AgileMapper.UnitTests.NetCore2/AgileMapper.UnitTests.NetCore2.csproj
+++ b/AgileMapper.UnitTests.NetCore2/AgileMapper.UnitTests.NetCore2.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/AgileMapper.UnitTests.NonParallel/app.config b/AgileMapper.UnitTests.NonParallel/app.config
index b4c3aaacc..b1d125491 100644
--- a/AgileMapper.UnitTests.NonParallel/app.config
+++ b/AgileMapper.UnitTests.NonParallel/app.config
@@ -4,7 +4,7 @@
-
+
diff --git a/AgileMapper.UnitTests.Orms.EFCore2.NetCore2/AgileMapper.UnitTests.Orms.EfCore2.NetCore2.csproj b/AgileMapper.UnitTests.Orms.EFCore2.NetCore2/AgileMapper.UnitTests.Orms.EfCore2.NetCore2.csproj
index 233aa58e2..2b3440bf8 100644
--- a/AgileMapper.UnitTests.Orms.EFCore2.NetCore2/AgileMapper.UnitTests.Orms.EfCore2.NetCore2.csproj
+++ b/AgileMapper.UnitTests.Orms.EFCore2.NetCore2/AgileMapper.UnitTests.Orms.EfCore2.NetCore2.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/AgileMapper.UnitTests.Orms.Ef5.LocalDb.csproj b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/AgileMapper.UnitTests.Orms.Ef5.LocalDb.csproj
index 6e6799b8a..415d552ff 100644
--- a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/AgileMapper.UnitTests.Orms.Ef5.LocalDb.csproj
+++ b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/AgileMapper.UnitTests.Orms.Ef5.LocalDb.csproj
@@ -45,8 +45,8 @@
..\AgileMapper.snk
-
- ..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
+
+ ..\packages\AgileObjects.NetStandardPolyfills.1.4.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll
diff --git a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/App.config b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/App.config
index da5fa9f0e..c279b5844 100644
--- a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/App.config
+++ b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/App.config
@@ -17,6 +17,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/packages.config b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/packages.config
index 5364bcad1..feb0ee3df 100644
--- a/AgileMapper.UnitTests.Orms.Ef5.LocalDb/packages.config
+++ b/AgileMapper.UnitTests.Orms.Ef5.LocalDb/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/AgileMapper.UnitTests.Orms.Ef5/AgileMapper.UnitTests.Orms.Ef5.csproj b/AgileMapper.UnitTests.Orms.Ef5/AgileMapper.UnitTests.Orms.Ef5.csproj
index 64c300e0f..ba9b553b2 100644
--- a/AgileMapper.UnitTests.Orms.Ef5/AgileMapper.UnitTests.Orms.Ef5.csproj
+++ b/AgileMapper.UnitTests.Orms.Ef5/AgileMapper.UnitTests.Orms.Ef5.csproj
@@ -47,7 +47,7 @@
- ..\packages\Effort.1.3.4\lib\net45\Effort.dll
+ ..\packages\Effort.1.3.5\lib\net45\Effort.dll
..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll
diff --git a/AgileMapper.UnitTests.Orms.Ef5/App.config b/AgileMapper.UnitTests.Orms.Ef5/App.config
index 3d5ee2c10..72aa76b53 100644
--- a/AgileMapper.UnitTests.Orms.Ef5/App.config
+++ b/AgileMapper.UnitTests.Orms.Ef5/App.config
@@ -20,6 +20,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms.Ef5/packages.config b/AgileMapper.UnitTests.Orms.Ef5/packages.config
index 64593b956..f5ba35773 100644
--- a/AgileMapper.UnitTests.Orms.Ef5/packages.config
+++ b/AgileMapper.UnitTests.Orms.Ef5/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/AgileMapper.UnitTests.Orms.Ef6.LocalDb.csproj b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/AgileMapper.UnitTests.Orms.Ef6.LocalDb.csproj
index 95ab6af79..67cd6b325 100644
--- a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/AgileMapper.UnitTests.Orms.Ef6.LocalDb.csproj
+++ b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/AgileMapper.UnitTests.Orms.Ef6.LocalDb.csproj
@@ -45,8 +45,8 @@
..\AgileMapper.snk
-
- ..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
+
+ ..\packages\AgileObjects.NetStandardPolyfills.1.4.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll
@@ -100,7 +100,9 @@
-
+
+ Designer
+
diff --git a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/App.config b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/App.config
index a653955ca..560d9159f 100644
--- a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/App.config
+++ b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/App.config
@@ -14,4 +14,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/packages.config b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/packages.config
index 54e6e4620..00bc851d6 100644
--- a/AgileMapper.UnitTests.Orms.Ef6.LocalDb/packages.config
+++ b/AgileMapper.UnitTests.Orms.Ef6.LocalDb/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/AgileMapper.UnitTests.Orms.Ef6/App.config b/AgileMapper.UnitTests.Orms.Ef6/App.config
index e6079b964..b8c386d9b 100644
--- a/AgileMapper.UnitTests.Orms.Ef6/App.config
+++ b/AgileMapper.UnitTests.Orms.Ef6/App.config
@@ -3,4 +3,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms.EfCore1/app.config b/AgileMapper.UnitTests.Orms.EfCore1/app.config
index d6e65bfe6..ad5ef9c84 100644
--- a/AgileMapper.UnitTests.Orms.EfCore1/app.config
+++ b/AgileMapper.UnitTests.Orms.EfCore1/app.config
@@ -50,6 +50,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms.EfCore2/app.config b/AgileMapper.UnitTests.Orms.EfCore2/app.config
index 02e56c21e..eafddf1b6 100644
--- a/AgileMapper.UnitTests.Orms.EfCore2/app.config
+++ b/AgileMapper.UnitTests.Orms.EfCore2/app.config
@@ -22,6 +22,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests.Orms/AgileMapper.UnitTests.Orms.csproj b/AgileMapper.UnitTests.Orms/AgileMapper.UnitTests.Orms.csproj
index 9649fe6a2..30cd697fe 100644
--- a/AgileMapper.UnitTests.Orms/AgileMapper.UnitTests.Orms.csproj
+++ b/AgileMapper.UnitTests.Orms/AgileMapper.UnitTests.Orms.csproj
@@ -172,6 +172,7 @@
+
diff --git a/AgileMapper.UnitTests.Orms/app.config b/AgileMapper.UnitTests.Orms/app.config
new file mode 100644
index 000000000..b1d125491
--- /dev/null
+++ b/AgileMapper.UnitTests.Orms/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AgileMapper.UnitTests/AgileMapper.UnitTests.csproj b/AgileMapper.UnitTests/AgileMapper.UnitTests.csproj
index 136330916..6d6032753 100644
--- a/AgileMapper.UnitTests/AgileMapper.UnitTests.csproj
+++ b/AgileMapper.UnitTests/AgileMapper.UnitTests.csproj
@@ -41,11 +41,11 @@
false
-
- ..\packages\AgileObjects.NetStandardPolyfills.1.3.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
+
+ ..\packages\AgileObjects.NetStandardPolyfills.1.4.0\lib\net40\AgileObjects.NetStandardPolyfills.dll
-
- ..\packages\AgileObjects.ReadableExpressions.1.11.0\lib\net40\AgileObjects.ReadableExpressions.dll
+
+ ..\packages\AgileObjects.ReadableExpressions.1.12.1\lib\net40\AgileObjects.ReadableExpressions.dll
..\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringCallbacksInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringCallbacksInline.cs
index f9104f524..4002ab9ef 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringCallbacksInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringCallbacksInline.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringCallbacksInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringConstructorDataSourcesInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringConstructorDataSourcesInline.cs
index 933db1c2f..07c38d95e 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringConstructorDataSourcesInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringConstructorDataSourcesInline.cs
@@ -2,8 +2,13 @@
{
using System;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringConstructorDataSourcesInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInline.cs
index c2bdfaf12..b26c7d18a 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInline.cs
@@ -5,8 +5,13 @@
using AgileMapper.Extensions;
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDataSourcesInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInlineIncorrectly.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInlineIncorrectly.cs
index 7ee2cbc3d..afdd63e9d 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInlineIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDataSourcesInlineIncorrectly.cs
@@ -3,8 +3,13 @@
using System;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDataSourcesInlineIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDerivedTypesInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDerivedTypesInline.cs
index bca8518ef..6a9db359c 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDerivedTypesInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringDerivedTypesInline.cs
@@ -4,8 +4,13 @@
using MoreTestClasses;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDerivedTypesInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringEnumMappingInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringEnumMappingInline.cs
index 6a9be04ed..b7c3d628e 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringEnumMappingInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringEnumMappingInline.cs
@@ -1,8 +1,13 @@
namespace AgileObjects.AgileMapper.UnitTests.Configuration.Inline
{
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringEnumMappingInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringNameMatchingInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringNameMatchingInline.cs
index 90ca6ecf5..cdb5b310f 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringNameMatchingInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringNameMatchingInline.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringNameMatchingInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectCreationInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectCreationInline.cs
index 1cb6b6a5d..f52e379f4 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectCreationInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectCreationInline.cs
@@ -3,8 +3,13 @@
using System;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectCreationInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectTrackingInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectTrackingInline.cs
index 921f2c567..343b9ab02 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectTrackingInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringObjectTrackingInline.cs
@@ -4,8 +4,13 @@
using System.Linq;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectTrackingInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringStringFormattingInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringStringFormattingInline.cs
index 05a741030..104b9fd48 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringStringFormattingInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringStringFormattingInline.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringStringFormattingInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringTypeIdentifiersInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringTypeIdentifiersInline.cs
index 16c0cbeab..5a8d34d9a 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringTypeIdentifiersInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenConfiguringTypeIdentifiersInline.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringTypeIdentifiersInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInline.cs
index 462f2ca85..b7077da54 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInline.cs
@@ -3,8 +3,13 @@
using System;
using Api.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembersInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInlineIncorrectly.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInlineIncorrectly.cs
index 3b81ceb9a..2bdf89e2a 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInlineIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenIgnoringMembersInlineIncorrectly.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembersInlineIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenMappingToNullInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenMappingToNullInline.cs
index 4374628fd..9277cae67 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenMappingToNullInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenMappingToNullInline.cs
@@ -1,9 +1,15 @@
namespace AgileObjects.AgileMapper.UnitTests.Configuration.Inline
{
using AgileMapper.Configuration;
+ using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingToNullInline
{
[Fact]
@@ -16,7 +22,7 @@ public void ShouldApplyAUserConfiguredConditionInline()
.ToANew(cfg => cfg
.WhenMapping
.To()
- .If((o, a) => string.IsNullOrWhiteSpace(a.Line1))
+ .If((o, a) => a.Line1.IsNullOrWhiteSpace())
.MapToNull());
result.Name.ShouldBe("Bob");
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenValidatingMappingsInline.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenValidatingMappingsInline.cs
index d508f6c30..203655b2a 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenValidatingMappingsInline.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenValidatingMappingsInline.cs
@@ -3,8 +3,13 @@
using System;
using TestClasses;
using Validation;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenValidatingMappingsInline
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/Inline/WhenViewingMappingPlans.cs b/AgileMapper.UnitTests/Configuration/Inline/WhenViewingMappingPlans.cs
index f1cd8bf0f..816158548 100644
--- a/AgileMapper.UnitTests/Configuration/Inline/WhenViewingMappingPlans.cs
+++ b/AgileMapper.UnitTests/Configuration/Inline/WhenViewingMappingPlans.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenViewingMappingPlans
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurations.cs b/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurations.cs
index 57e96b13b..e83ca5d24 100644
--- a/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurations.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurations.cs
@@ -8,8 +8,13 @@
using MoreTestClasses;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenApplyingMapperConfigurations : AssemblyScanningTestClassBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurationsIncorrectly.cs b/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurationsIncorrectly.cs
index 3405a0d2d..ccf2bec9a 100644
--- a/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurationsIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenApplyingMapperConfigurationsIncorrectly.cs
@@ -4,8 +4,13 @@
using System.Reflection;
using AgileMapper.Configuration;
using MoreTestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenApplyingMapperConfigurationsIncorrectly : AssemblyScanningTestClassBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringConstructorDataSources.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringConstructorDataSources.cs
index 6a994d2ba..ac2df77a4 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringConstructorDataSources.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringConstructorDataSources.cs
@@ -2,8 +2,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Configuration
{
using System;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringConstructorDataSources
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSources.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSources.cs
index 5e253594c..6f10ceed0 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSources.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSources.cs
@@ -8,8 +8,13 @@
using AgileMapper.Extensions;
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDataSources
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSourcesIncorrectly.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSourcesIncorrectly.cs
index 5c205d004..1b1ea754d 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSourcesIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringDataSourcesIncorrectly.cs
@@ -3,8 +3,13 @@
using System;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDataSourcesIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypes.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypes.cs
index 7c42f0c79..1b7abe901 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypes.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypes.cs
@@ -1,10 +1,16 @@
namespace AgileObjects.AgileMapper.UnitTests.Configuration
{
+ using AgileMapper.Extensions.Internal;
using MoreTestClasses;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDerivedTypes
{
[Fact]
@@ -88,7 +94,7 @@ public void ShouldMapADerivedTypePairConditionally()
.If(s => s.Source.Discount.HasValue)
.MapTo()
.And
- .If(x => !string.IsNullOrWhiteSpace(x.Source.Report))
+ .If(x => !x.Source.Report.IsNullOrWhiteSpace())
.MapTo();
var mysteryCustomerSource = new
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypesIncorrectly.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypesIncorrectly.cs
index c261452fb..8644e5dd8 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypesIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringDerivedTypesIncorrectly.cs
@@ -4,8 +4,13 @@
using System.Reflection;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDerivedTypesIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringEnumMapping.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringEnumMapping.cs
index 32180e5e1..2a18fe326 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringEnumMapping.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringEnumMapping.cs
@@ -3,8 +3,13 @@
using System;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringEnumMapping
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringExceptionHandling.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringExceptionHandling.cs
index 4dccc5d12..c27a2cf0c 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringExceptionHandling.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringExceptionHandling.cs
@@ -2,8 +2,13 @@
{
using System;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringExceptionHandling
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringMappingCallbacks.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringMappingCallbacks.cs
index 191fbe408..0fe0ed98e 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringMappingCallbacks.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringMappingCallbacks.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringMappingCallbacks
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringNameMatching.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringNameMatching.cs
index 9670c77db..7857ee9af 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringNameMatching.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringNameMatching.cs
@@ -5,8 +5,13 @@
using AgileMapper.Configuration;
using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringNameMatching
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreation.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreation.cs
index a4e1bb017..8301d4019 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreation.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreation.cs
@@ -7,8 +7,13 @@
using AgileMapper.Configuration;
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectCreation
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreationCallbacks.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreationCallbacks.cs
index bf243ab57..235439c06 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreationCallbacks.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectCreationCallbacks.cs
@@ -8,8 +8,13 @@
using AgileMapper.Members;
using ReadableExpressions.Extensions;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectCreationCallbacks
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTracking.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTracking.cs
index c011bf613..c998433f0 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTracking.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTracking.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectTracking
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTrackingIncorrectly.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTrackingIncorrectly.cs
index cdcdc0088..2182af8b1 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTrackingIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringObjectTrackingIncorrectly.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringObjectTrackingIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringStringFormatting.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringStringFormatting.cs
index bfed8a4d3..ea26a2b8f 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringStringFormatting.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringStringFormatting.cs
@@ -3,8 +3,13 @@
using System;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringStringFormatting
{
// See https://github.com/agileobjects/AgileMapper/issues/23
diff --git a/AgileMapper.UnitTests/Configuration/WhenConfiguringTypeIdentifiers.cs b/AgileMapper.UnitTests/Configuration/WhenConfiguringTypeIdentifiers.cs
index 5585d35d4..afad44bca 100644
--- a/AgileMapper.UnitTests/Configuration/WhenConfiguringTypeIdentifiers.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenConfiguringTypeIdentifiers.cs
@@ -5,8 +5,13 @@
using System.Linq;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringTypeIdentifiers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembers.cs b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembers.cs
index 9fd349a91..08531d88d 100644
--- a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembers.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembers.cs
@@ -6,8 +6,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Configuration
using AgileMapper.Configuration;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByFilter.cs b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByFilter.cs
index bfc26ca55..5eddac21a 100644
--- a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByFilter.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByFilter.cs
@@ -4,8 +4,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Configuration
using AgileMapper.Extensions.Internal;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembersByFilter
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByGlobalFilter.cs b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByGlobalFilter.cs
index a279c7c9e..6da78fd5a 100644
--- a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByGlobalFilter.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersByGlobalFilter.cs
@@ -4,8 +4,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Configuration
using AgileMapper.Extensions.Internal;
using NetStandardPolyfills;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembersByGlobalFilter
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersIncorrectly.cs b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersIncorrectly.cs
index 9f509b703..b8929cf11 100644
--- a/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersIncorrectly.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenIgnoringMembersIncorrectly.cs
@@ -2,8 +2,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Configuration
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenIgnoringMembersIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Configuration/WhenMappingToNull.cs b/AgileMapper.UnitTests/Configuration/WhenMappingToNull.cs
index 693f1cabc..96acd083e 100644
--- a/AgileMapper.UnitTests/Configuration/WhenMappingToNull.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenMappingToNull.cs
@@ -4,9 +4,15 @@
using System.Collections.Generic;
using System.Linq;
using AgileMapper.Configuration;
+ using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingToNull
{
[Fact]
@@ -16,7 +22,7 @@ public void ShouldApplyAUserConfiguredCondition()
{
mapper.WhenMapping
.To()
- .If((o, a) => string.IsNullOrWhiteSpace(a.Line1))
+ .If((o, a) => a.Line1.IsNullOrWhiteSpace())
.MapToNull();
var source = new CustomerViewModel { Name = "Bob" };
diff --git a/AgileMapper.UnitTests/Configuration/WhenViewingMappingPlans.cs b/AgileMapper.UnitTests/Configuration/WhenViewingMappingPlans.cs
index b1078a460..aaa587678 100644
--- a/AgileMapper.UnitTests/Configuration/WhenViewingMappingPlans.cs
+++ b/AgileMapper.UnitTests/Configuration/WhenViewingMappingPlans.cs
@@ -2,8 +2,13 @@
{
using System.Collections.ObjectModel;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenViewingMappingPlans
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringDictionaryMappingIncorrectly.cs b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringDictionaryMappingIncorrectly.cs
index 5342ee072..2c9a7d5ef 100644
--- a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringDictionaryMappingIncorrectly.cs
+++ b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringDictionaryMappingIncorrectly.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringDictionaryMappingIncorrectly
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringNestedDictionaryMapping.cs b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringNestedDictionaryMapping.cs
index d53764070..1793199a3 100644
--- a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringNestedDictionaryMapping.cs
+++ b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringNestedDictionaryMapping.cs
@@ -2,8 +2,13 @@
{
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringNestedDictionaryMapping
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringSourceDictionaryMapping.cs b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringSourceDictionaryMapping.cs
index 60963a985..5935075cd 100644
--- a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringSourceDictionaryMapping.cs
+++ b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringSourceDictionaryMapping.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringSourceDictionaryMapping
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringTargetDictionaryMapping.cs b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringTargetDictionaryMapping.cs
index 0c961e59e..f153edfed 100644
--- a/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringTargetDictionaryMapping.cs
+++ b/AgileMapper.UnitTests/Dictionaries/Configuration/WhenConfiguringTargetDictionaryMapping.cs
@@ -5,8 +5,13 @@
using System.Collections.ObjectModel;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenConfiguringTargetDictionaryMapping
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenCreatingRootDictionaryMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenCreatingRootDictionaryMembers.cs
index ef0b2976e..c4d414774 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenCreatingRootDictionaryMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenCreatingRootDictionaryMembers.cs
@@ -5,8 +5,13 @@
using AgileMapper.Members.Dictionaries;
using Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCreatingRootDictionaryMembers : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToComplexTypes.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToComplexTypes.cs
index 7a2c2e7bf..557772625 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToComplexTypes.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToComplexTypes.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesOnToComplexTypes
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToEnumerableMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToEnumerableMembers.cs
index d9b7e6ed8..c5ff3d42c 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToEnumerableMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOnToEnumerableMembers.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesOnToEnumerableMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOverComplexTypes.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOverComplexTypes.cs
index 73408fd97..52414958a 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOverComplexTypes.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesOverComplexTypes.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesOverComplexTypes
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypeMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypeMembers.cs
index 796b7a881..c66333ee9 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypeMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypeMembers.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesToNewComplexTypeMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypes.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypes.cs
index 11772cc10..011f97da1 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypes.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewComplexTypes.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesToNewComplexTypes
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerableMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerableMembers.cs
index dc4837b90..79f63efbe 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerableMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerableMembers.cs
@@ -4,12 +4,17 @@ namespace AgileObjects.AgileMapper.UnitTests.Dictionaries
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
-#if !NETCOREAPP1_0
+#if !NETCOREAPP1_0 && !NET35
using Microsoft.Extensions.Primitives;
#endif
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesToNewEnumerableMembers
{
[Fact]
@@ -115,7 +120,7 @@ public void ShouldMapToAComplexTypeArrayFromUntypedDottedEntries()
result.Value.Second().HowMega.ShouldBe(0.99);
}
-#if !NETCOREAPP1_0
+#if !NETCOREAPP1_0 && !NET35
// See https://github.com/agileobjects/AgileMapper/issues/50
// See https://github.com/agileobjects/AgileMapper/issues/51
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerables.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerables.cs
index e4127899a..fbac6a239 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerables.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionariesToNewEnumerables.cs
@@ -4,8 +4,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Dictionaries
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionariesToNewEnumerables
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionaryMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionaryMembers.cs
index 0576cef02..c1772f1c3 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionaryMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingFromDictionaryMembers.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingFromDictionaryMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaries.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaries.cs
index ddb2282b9..b90ffebd1 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaries.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaries.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingOnToDictionaries
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaryMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaryMembers.cs
index b34db32f6..69e60a5b1 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaryMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingOnToDictionaryMembers.cs
@@ -3,8 +3,13 @@
using System;
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingOnToDictionaryMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaries.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaries.cs
index 4f9923337..0c26dad4a 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaries.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaries.cs
@@ -5,8 +5,13 @@
using System.Collections.ObjectModel;
using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingOverDictionaries
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaryMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaryMembers.cs
index 3c412e523..0028aba40 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaryMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingOverDictionaryMembers.cs
@@ -2,8 +2,13 @@
{
using System.Collections.Generic;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingOverDictionaryMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaries.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaries.cs
index fedd4b07c..f902c9bff 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaries.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaries.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingToNewDictionaries
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaryMembers.cs b/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaryMembers.cs
index 97c9e8804..6a178516c 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaryMembers.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenMappingToNewDictionaryMembers.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingToNewDictionaryMembers
{
[Fact]
diff --git a/AgileMapper.UnitTests/Dictionaries/WhenViewingDictionaryMappingPlans.cs b/AgileMapper.UnitTests/Dictionaries/WhenViewingDictionaryMappingPlans.cs
index e3f4cc231..211d28865 100644
--- a/AgileMapper.UnitTests/Dictionaries/WhenViewingDictionaryMappingPlans.cs
+++ b/AgileMapper.UnitTests/Dictionaries/WhenViewingDictionaryMappingPlans.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenViewingDictionaryMappingPlans
{
[Fact]
@@ -18,7 +23,11 @@ public void ShouldShowATargetObjectMappingPlan()
plan.ShouldContain("idKey = sourceDictionary_String_String.Keys.FirstOrDefault(key => key.MatchesKey(\"Id\"");
plan.ShouldContain("id = sourceDictionary_String_String[idKey]");
plan.ShouldContain("customerViewModel.Id =");
+#if NET35
+ plan.ShouldContain("id.ToGuid()");
+#else
plan.ShouldContain("Guid.TryParse(id");
+#endif
}
[Fact]
diff --git a/AgileMapper.UnitTests/Extensions/Internal/WhenEquatingExpressions.cs b/AgileMapper.UnitTests/Extensions/Internal/WhenEquatingExpressions.cs
index 183bd65b8..c3a490978 100644
--- a/AgileMapper.UnitTests/Extensions/Internal/WhenEquatingExpressions.cs
+++ b/AgileMapper.UnitTests/Extensions/Internal/WhenEquatingExpressions.cs
@@ -5,8 +5,14 @@
using System.Linq.Expressions;
using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Dlr = Microsoft.Scripting.Ast;
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenEquatingExpressions
{
[Fact]
@@ -15,7 +21,7 @@ public void ShouldEquateCheckedAdditions()
Expression> bindingsOne = (x, y) => checked(x + y);
Expression> bindingsTwo = (x, y) => checked(x + y);
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -24,7 +30,7 @@ public void ShouldEquateCheckedSubtractions()
Expression> bindingsOne = (x, y) => checked(x - y);
Expression> bindingsTwo = (x, y) => checked(x - y);
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -33,7 +39,7 @@ public void ShouldEquateCheckedMultiplications()
Expression> bindingsOne = (x, y) => checked(x * y);
Expression> bindingsTwo = (x, y) => checked(x * y);
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
public void ShouldEquateAModuloOperation()
@@ -41,7 +47,7 @@ public void ShouldEquateAModuloOperation()
Expression> bindingsOne = (x, y) => x % y == 0;
Expression> bindingsTwo = (x, y) => x % y == 0;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -50,7 +56,7 @@ public void ShouldEquateNegatedDefaultComparisons()
Expression> bindingsOne = x => !(x > default(int));
Expression> bindingsTwo = x => !(x > default(int));
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -59,7 +65,7 @@ public void ShouldEquateTypeIsComparisons()
Expression> bindingsOne = x => x is Person;
Expression> bindingsTwo = x => x is Person;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -68,7 +74,7 @@ public void ShouldEquateTypeAsComparisons()
Expression> bindingsOne = x => x as Person;
Expression> bindingsTwo = x => x as Person;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -77,7 +83,7 @@ public void ShouldEquateAndComparisons()
Expression> bindingsOne = x => x > 0 && x < 100;
Expression> bindingsTwo = x => x > 0 && x < 100;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -86,7 +92,7 @@ public void ShouldEquateBitwiseAndComparisons()
Expression> bindingsOne = x => x > 0 & x < 100;
Expression> bindingsTwo = x => x > 0 & x < 100;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -95,7 +101,7 @@ public void ShouldEquateOrComparisons()
Expression> bindingsOne = x => x > 0 || x < 100;
Expression> bindingsTwo = x => x > 0 || x < 100;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -104,7 +110,7 @@ public void ShouldEquateBitwiseOrComparisons()
Expression> bindingsOne = x => x > 0 | x < 100;
Expression> bindingsTwo = x => x > 0 | x < 100;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -113,7 +119,7 @@ public void ShouldEquateExclusiveOrComparisons()
Expression> bindingsOne = x => x > 0 ^ x < 100;
Expression> bindingsTwo = x => x > 0 ^ x < 100;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -122,7 +128,7 @@ public void ShouldEquateMemberAccesses()
Expression> accessOne = m => m.Expression.NodeType;
Expression> accessTwo = m => m.Expression.NodeType;
- ExpressionEvaluation.AreEqual(accessOne, accessTwo).ShouldBeTrue();
+ VerifyEqual(accessOne, accessTwo);
}
[Fact]
@@ -131,7 +137,7 @@ public void ShouldEquivalateMemberAccesses()
Expression> accessOne = m => m.Expression.NodeType;
Expression> accessTwo = e => e.NodeType;
- ExpressionEvaluation.AreEquivalent(accessOne, accessTwo).ShouldBeTrue();
+ VerifyEquivalent(accessOne, accessTwo);
}
[Fact]
@@ -140,7 +146,7 @@ public void ShouldEquateListInitialisations()
Expression>> bindingsOne = () => new List { 1, 2, 3 };
Expression>> bindingsTwo = () => new List { 1, 2, 3 };
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -149,7 +155,7 @@ public void ShouldEquateBitwiseLeftShiftOperations()
Expression> bindingsOne = (x, y) => x << y;
Expression> bindingsTwo = (x, y) => x << y;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -158,7 +164,7 @@ public void ShouldEquateBitwiseRightShiftOperations()
Expression> bindingsOne = (x, y) => x >> y;
Expression> bindingsTwo = (x, y) => x >> y;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -167,7 +173,7 @@ public void ShouldEquateCoalesceOperations()
Expression> bindingsOne = (x, y) => x ?? y;
Expression> bindingsTwo = (x, y) => x ?? y;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -176,7 +182,7 @@ public void ShouldEquateNegationOperations()
Expression> bindingsOne = x => -x;
Expression> bindingsTwo = x => -x;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -185,7 +191,7 @@ public void ShouldEquateCheckedNegationOperations()
Expression> bindingsOne = x => checked(-x);
Expression> bindingsTwo = x => checked(-x);
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -194,7 +200,7 @@ public void ShouldEquateANewBoundedArrayCreation()
Expression> bindingsOne = x => new int[x];
Expression> bindingsTwo = x => new int[x];
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -203,7 +209,7 @@ public void ShouldEquateArrayIndexAccesses()
Expression> bindingsOne = x => x[0];
Expression> bindingsTwo = x => x[0];
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -212,7 +218,7 @@ public void ShouldEquateArrayLengthAccesses()
Expression> bindingsOne = x => x.Length == 1;
Expression> bindingsTwo = x => x.Length == 1;
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -221,7 +227,7 @@ public void ShouldEquateListBindings()
Expression>>> bindingsOne = () => new PublicField> { Value = { 1 } };
Expression>>> bindingsTwo = () => new PublicField> { Value = { 1 } };
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeTrue();
+ VerifyEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -230,7 +236,7 @@ public void ShouldDifferentiateListInitialisationsByInitialisationCount()
Expression>> bindingsOne = () => new List { 1, 2, 3 };
Expression>> bindingsTwo = () => new List { 1, 2 };
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeFalse();
+ VerifyNotEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -239,7 +245,7 @@ public void ShouldDifferentiateExpressionsByListBindingInitialiserCount()
Expression>>> bindingsOne = () => new PublicField> { Value = { 1 } };
Expression>>> bindingsTwo = () => new PublicField> { Value = { 1, 2 } };
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeFalse();
+ VerifyNotEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -248,7 +254,7 @@ public void ShouldDifferentiateExpressionsByBindingCount()
Expression> oneBinding = () => new Address { Line1 = "One!" };
Expression> twoBindings = () => new Address { Line1 = "One!", Line2 = "Two!" };
- ExpressionEvaluation.AreEqual(oneBinding, twoBindings).ShouldBeFalse();
+ VerifyNotEqual(oneBinding, twoBindings);
}
[Fact]
@@ -266,7 +272,7 @@ public void ShouldDifferentiateExpressionsByBindingType()
Value1 = "One!"
};
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeFalse();
+ VerifyNotEqual(bindingsOne, bindingsTwo);
}
[Fact]
@@ -275,7 +281,29 @@ public void ShouldDifferentiateExpressionsBySubBindings()
Expression> bindingsOne = () => new Person { Address = { Line1 = "One!" } };
Expression> bindingsTwo = () => new Person { Address = { Line1 = "One!", Line2 = "Two!" } };
- ExpressionEvaluation.AreEqual(bindingsOne, bindingsTwo).ShouldBeFalse();
+ VerifyNotEqual(bindingsOne, bindingsTwo);
+ }
+
+ private static void VerifyEqual(Expression one, Expression two) => Verify(one, two).ShouldBeTrue();
+
+ private static void VerifyNotEqual(Expression one, Expression two) => Verify(one, two).ShouldBeFalse();
+
+ private static bool Verify(Expression one, Expression two)
+ {
+#if NET35
+ return ExpressionEvaluation.AreEqual(one.ToDlrExpression(), two.ToDlrExpression());
+#else
+ return ExpressionEvaluation.AreEqual(one, two);
+#endif
+ }
+
+ private static void VerifyEquivalent(Expression one, Expression two)
+ {
+#if NET35
+ ExpressionEvaluation.AreEquivalent(one.ToDlrExpression(), two.ToDlrExpression()).ShouldBeTrue();
+#else
+ ExpressionEvaluation.AreEquivalent(one, two).ShouldBeTrue();
+#endif
}
}
}
diff --git a/AgileMapper.UnitTests/Extensions/Internal/WhenGeneratingVariableNames.cs b/AgileMapper.UnitTests/Extensions/Internal/WhenGeneratingVariableNames.cs
index 719f84292..4d9d397b7 100644
--- a/AgileMapper.UnitTests/Extensions/Internal/WhenGeneratingVariableNames.cs
+++ b/AgileMapper.UnitTests/Extensions/Internal/WhenGeneratingVariableNames.cs
@@ -3,8 +3,13 @@
using System.Collections.Generic;
using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenGeneratingVariableNames
{
[Fact]
diff --git a/AgileMapper.UnitTests/Extensions/WhenFlatteningToQueryStringViaExtensionMethods.cs b/AgileMapper.UnitTests/Extensions/WhenFlatteningToQueryStringViaExtensionMethods.cs
index 4127088d3..92a52af05 100644
--- a/AgileMapper.UnitTests/Extensions/WhenFlatteningToQueryStringViaExtensionMethods.cs
+++ b/AgileMapper.UnitTests/Extensions/WhenFlatteningToQueryStringViaExtensionMethods.cs
@@ -4,8 +4,13 @@
using System.Linq;
using AgileMapper.Extensions;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenFlatteningToQueryStringViaExtensionMethods
{
[Fact]
diff --git a/AgileMapper.UnitTests/Extensions/WhenFlatteningViaExtensionMethods.cs b/AgileMapper.UnitTests/Extensions/WhenFlatteningViaExtensionMethods.cs
index ffa326d25..4959abf84 100644
--- a/AgileMapper.UnitTests/Extensions/WhenFlatteningViaExtensionMethods.cs
+++ b/AgileMapper.UnitTests/Extensions/WhenFlatteningViaExtensionMethods.cs
@@ -2,10 +2,16 @@
{
using AgileMapper.Extensions;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenFlatteningViaExtensionMethods
{
+#if !NET35
[Fact]
public void ShouldFlattenToDynamic()
{
@@ -105,7 +111,7 @@ public void ShouldFlattenToDynamicWithInlineConfigurationAndASpecifiedMapper()
((string)result._2_Line2).ShouldBe("3_2");
}
}
-
+#endif
[Fact]
public void ShouldFlattenToDictionary()
{
diff --git a/AgileMapper.UnitTests/Extensions/WhenMappingViaExtensionMethods.cs b/AgileMapper.UnitTests/Extensions/WhenMappingViaExtensionMethods.cs
index cb0fac831..95dcbc445 100644
--- a/AgileMapper.UnitTests/Extensions/WhenMappingViaExtensionMethods.cs
+++ b/AgileMapper.UnitTests/Extensions/WhenMappingViaExtensionMethods.cs
@@ -4,8 +4,13 @@
using System.Globalization;
using AgileMapper.Extensions;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMappingViaExtensionMethods
{
[Fact]
diff --git a/AgileMapper.UnitTests/MapperCloning/WhenCloningConstructorDataSources.cs b/AgileMapper.UnitTests/MapperCloning/WhenCloningConstructorDataSources.cs
index 05d965123..375e43264 100644
--- a/AgileMapper.UnitTests/MapperCloning/WhenCloningConstructorDataSources.cs
+++ b/AgileMapper.UnitTests/MapperCloning/WhenCloningConstructorDataSources.cs
@@ -2,8 +2,13 @@
{
using System;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCloningConstructorDataSources
{
[Fact]
diff --git a/AgileMapper.UnitTests/MapperCloning/WhenCloningDataSources.cs b/AgileMapper.UnitTests/MapperCloning/WhenCloningDataSources.cs
index ee981e8bf..9f898ffd9 100644
--- a/AgileMapper.UnitTests/MapperCloning/WhenCloningDataSources.cs
+++ b/AgileMapper.UnitTests/MapperCloning/WhenCloningDataSources.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCloningDataSources
{
[Fact]
diff --git a/AgileMapper.UnitTests/MapperCloning/WhenCloningMemberIgnores.cs b/AgileMapper.UnitTests/MapperCloning/WhenCloningMemberIgnores.cs
index e661b0d36..47c0c78dc 100644
--- a/AgileMapper.UnitTests/MapperCloning/WhenCloningMemberIgnores.cs
+++ b/AgileMapper.UnitTests/MapperCloning/WhenCloningMemberIgnores.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCloningMemberIgnores
{
[Fact]
diff --git a/AgileMapper.UnitTests/MapperCloning/WhenCloningObjectFactories.cs b/AgileMapper.UnitTests/MapperCloning/WhenCloningObjectFactories.cs
index 6249f7285..8730fbf77 100644
--- a/AgileMapper.UnitTests/MapperCloning/WhenCloningObjectFactories.cs
+++ b/AgileMapper.UnitTests/MapperCloning/WhenCloningObjectFactories.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using AgileMapper.Configuration;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCloningObjectFactories
{
[Fact]
diff --git a/AgileMapper.UnitTests/MapperCloning/WhenCloningStringFormatting.cs b/AgileMapper.UnitTests/MapperCloning/WhenCloningStringFormatting.cs
index a8a7838c2..cb289830e 100644
--- a/AgileMapper.UnitTests/MapperCloning/WhenCloningStringFormatting.cs
+++ b/AgileMapper.UnitTests/MapperCloning/WhenCloningStringFormatting.cs
@@ -1,8 +1,13 @@
namespace AgileObjects.AgileMapper.UnitTests.MapperCloning
{
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCloningStringFormatting
{
[Fact]
diff --git a/AgileMapper.UnitTests/Members/MemberTestsBase.cs b/AgileMapper.UnitTests/Members/MemberTestsBase.cs
index 9401f9be0..19e8c0cc1 100644
--- a/AgileMapper.UnitTests/Members/MemberTestsBase.cs
+++ b/AgileMapper.UnitTests/Members/MemberTestsBase.cs
@@ -3,7 +3,6 @@
using System;
using System.Linq;
using System.Linq.Expressions;
- using AgileMapper.Extensions.Internal;
using AgileMapper.Members;
using NetStandardPolyfills;
@@ -14,10 +13,10 @@ public abstract class MemberTestsBase
internal IQualifiedMember SourceMemberFor(T sourceObject)
{
- var sourceParameter = Parameters.Create("source");
+ var sourceParameter = Expression.Parameter(typeof(T), "source");
var sourceProperty = typeof(T).GetPublicInstanceProperties().First();
var sourcePropertyAccess = Expression.Property(sourceParameter, sourceProperty);
- var sourcePropertyCastToObject = sourcePropertyAccess.GetConversionToObject();
+ var sourcePropertyCastToObject = Expression.Convert(sourcePropertyAccess, typeof(object));
var sourcePropertyLambda = Expression.Lambda>(sourcePropertyCastToObject, sourceParameter);
return SourceMemberFor(sourceObject, sourcePropertyLambda);
diff --git a/AgileMapper.UnitTests/Members/WhenCreatingTargetMembersFromExpressions.cs b/AgileMapper.UnitTests/Members/WhenCreatingTargetMembersFromExpressions.cs
index 9da189b01..7cccfe9e1 100644
--- a/AgileMapper.UnitTests/Members/WhenCreatingTargetMembersFromExpressions.cs
+++ b/AgileMapper.UnitTests/Members/WhenCreatingTargetMembersFromExpressions.cs
@@ -6,8 +6,13 @@
using System.Linq.Expressions;
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenCreatingTargetMembersFromExpressions : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Members/WhenDeterminingATypeIdentifier.cs b/AgileMapper.UnitTests/Members/WhenDeterminingATypeIdentifier.cs
index 9f7f1f3f9..e37d292bb 100644
--- a/AgileMapper.UnitTests/Members/WhenDeterminingATypeIdentifier.cs
+++ b/AgileMapper.UnitTests/Members/WhenDeterminingATypeIdentifier.cs
@@ -1,8 +1,13 @@
namespace AgileObjects.AgileMapper.UnitTests.Members
{
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenDeterminingATypeIdentifier : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Members/WhenDeterminingRecursion.cs b/AgileMapper.UnitTests/Members/WhenDeterminingRecursion.cs
index 2431be88b..a5894d869 100644
--- a/AgileMapper.UnitTests/Members/WhenDeterminingRecursion.cs
+++ b/AgileMapper.UnitTests/Members/WhenDeterminingRecursion.cs
@@ -2,8 +2,13 @@
{
using AgileMapper.Members;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenDeterminingRecursion : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Members/WhenFindingDataSources.cs b/AgileMapper.UnitTests/Members/WhenFindingDataSources.cs
index 4d75f546c..38a0dd9c8 100644
--- a/AgileMapper.UnitTests/Members/WhenFindingDataSources.cs
+++ b/AgileMapper.UnitTests/Members/WhenFindingDataSources.cs
@@ -5,8 +5,13 @@ namespace AgileObjects.AgileMapper.UnitTests.Members
using AgileMapper.Members;
using ObjectPopulation;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenFindingDataSources : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Members/WhenFindingSourceMembers.cs b/AgileMapper.UnitTests/Members/WhenFindingSourceMembers.cs
index 123c6609e..140b5e492 100644
--- a/AgileMapper.UnitTests/Members/WhenFindingSourceMembers.cs
+++ b/AgileMapper.UnitTests/Members/WhenFindingSourceMembers.cs
@@ -3,8 +3,13 @@
using System;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
// ReSharper disable PossibleNullReferenceException
public class WhenFindingSourceMembers : MemberTestsBase
{
diff --git a/AgileMapper.UnitTests/Members/WhenFindingTargetMembers.cs b/AgileMapper.UnitTests/Members/WhenFindingTargetMembers.cs
index a59c9e4a9..3f8383ce1 100644
--- a/AgileMapper.UnitTests/Members/WhenFindingTargetMembers.cs
+++ b/AgileMapper.UnitTests/Members/WhenFindingTargetMembers.cs
@@ -4,8 +4,13 @@
using System.Collections.Generic;
using System.Linq;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
// ReSharper disable PossibleNullReferenceException
public class WhenFindingTargetMembers : MemberTestsBase
{
diff --git a/AgileMapper.UnitTests/Members/WhenMatchingSourceToTargetMembers.cs b/AgileMapper.UnitTests/Members/WhenMatchingSourceToTargetMembers.cs
index 9c3d60ff2..da4d088fc 100644
--- a/AgileMapper.UnitTests/Members/WhenMatchingSourceToTargetMembers.cs
+++ b/AgileMapper.UnitTests/Members/WhenMatchingSourceToTargetMembers.cs
@@ -2,8 +2,13 @@
{
using System;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenMatchingSourceToTargetMembers : MemberTestsBase
{
[Fact]
diff --git a/AgileMapper.UnitTests/Reflection/WhenAccessingTypeInformation.cs b/AgileMapper.UnitTests/Reflection/WhenAccessingTypeInformation.cs
index 9f8c52d8c..55b762852 100644
--- a/AgileMapper.UnitTests/Reflection/WhenAccessingTypeInformation.cs
+++ b/AgileMapper.UnitTests/Reflection/WhenAccessingTypeInformation.cs
@@ -5,8 +5,13 @@
using System.Collections.Generic;
using AgileMapper.Extensions.Internal;
using TestClasses;
+#if !NET35
using Xunit;
+#else
+ using Fact = NUnit.Framework.TestAttribute;
+ [NUnit.Framework.TestFixture]
+#endif
public class WhenAccessingTypeInformation
{
#region IsEnumerable
@@ -94,5 +99,17 @@ public void ShouldNotEvaluateANullableValueTypeAsComplex()
}
#endregion
+
+ [Fact]
+ public void ShouldEvaluateATypeAsFromTheBcl()
+ {
+ typeof(Func<>).IsFromBcl().ShouldBeTrue();
+ }
+
+ [Fact]
+ public void ShouldEvaluateATypeAsNotFromTheBcl()
+ {
+ typeof(WhenAccessingTypeInformation).IsFromBcl().ShouldBeFalse();
+ }
}
}
diff --git a/AgileMapper.UnitTests/Should.cs b/AgileMapper.UnitTests/Should.cs
index 26c900af5..ef48c977a 100644
--- a/AgileMapper.UnitTests/Should.cs
+++ b/AgileMapper.UnitTests/Should.cs
@@ -1,7 +1,9 @@
namespace AgileObjects.AgileMapper.UnitTests
{
using System;
+#if !NET35
using System.Threading.Tasks;
+#endif
public static class Should
{
@@ -31,6 +33,7 @@ public static TException Throw(Func