diff --git a/appveyor.yml b/appveyor.yml index ea887ae..517d04a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,7 +67,8 @@ after_build: } test_script: -- dotnet test "test\Dapper.AmbientContext.Tests\Dapper.AmbientContext.Tests.csproj" -c %CONFIGURATION% +- dotnet test "test\Dapper.AmbientContext.Tests\Dapper.AmbientContext.Tests.csproj" --no-build --no-restore -c %CONFIGURATION% -f net452 -a %USERPROFILE%\.nuget\packages\machine.specifications.runner.visualstudio\2.8.0 +- dotnet test "test\Dapper.AmbientContext.Tests\Dapper.AmbientContext.Tests.csproj" --no-build --no-restore -c %CONFIGURATION% -f netcoreapp2.1 #---------------------------------# # artifacts configuration # diff --git a/samples/Dapper.AmbientContext.Examples.ConsoleApp/Dapper.AmbientContext.Examples.ConsoleApp.csproj b/samples/Dapper.AmbientContext.Examples.ConsoleApp/Dapper.AmbientContext.Examples.ConsoleApp.csproj index 06e1754..be90c61 100644 --- a/samples/Dapper.AmbientContext.Examples.ConsoleApp/Dapper.AmbientContext.Examples.ConsoleApp.csproj +++ b/samples/Dapper.AmbientContext.Examples.ConsoleApp/Dapper.AmbientContext.Examples.ConsoleApp.csproj @@ -1,22 +1,16 @@ - + Exe - netcoreapp2.0 + netcoreapp2.1 - + - - - ..\..\..\..\..\Users\sakopov\.nuget\packages\system.data.sqlclient\4.4.0\ref\netstandard1.3\System.Data.SqlClient.dll - - - diff --git a/samples/Dapper.AmbientContext.Examples.WebApp/Dapper.AmbientContext.Examples.WebApp.csproj b/samples/Dapper.AmbientContext.Examples.WebApp/Dapper.AmbientContext.Examples.WebApp.csproj index 4c913c5..fa54289 100644 --- a/samples/Dapper.AmbientContext.Examples.WebApp/Dapper.AmbientContext.Examples.WebApp.csproj +++ b/samples/Dapper.AmbientContext.Examples.WebApp/Dapper.AmbientContext.Examples.WebApp.csproj @@ -1,19 +1,11 @@ - + - netcoreapp2.0 + netcoreapp2.1 - - - - - - - - - + diff --git a/src/Dapper.AmbientContext/Dapper.AmbientContext.csproj b/src/Dapper.AmbientContext/Dapper.AmbientContext.csproj index 747c7cd..0e05c88 100644 --- a/src/Dapper.AmbientContext/Dapper.AmbientContext.csproj +++ b/src/Dapper.AmbientContext/Dapper.AmbientContext.csproj @@ -3,7 +3,7 @@ Ambient context implementation for Dapper.NET Copyright Sergey Akopov - 1.6.0 + 1.7.0 Sergey Akopov net451;netstandard1.3;netstandard2.0 Dapper.AmbientContext @@ -21,7 +21,7 @@ - + diff --git a/test/Dapper.AmbientContext.Tests/AmbientDbContextFactoryTests.cs b/test/Dapper.AmbientContext.Tests/AmbientDbContextFactoryTests.cs index 25ac88c..3b21ce4 100644 --- a/test/Dapper.AmbientContext.Tests/AmbientDbContextFactoryTests.cs +++ b/test/Dapper.AmbientContext.Tests/AmbientDbContextFactoryTests.cs @@ -14,7 +14,7 @@ class When_calling_create_with_none_closed_database_connection { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -56,7 +56,7 @@ class When_calling_create_with_closed_database_connection { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); diff --git a/test/Dapper.AmbientContext.Tests/AmbientDbContextLocatorTests.cs b/test/Dapper.AmbientContext.Tests/AmbientDbContextLocatorTests.cs index 1a112a7..dd29da5 100644 --- a/test/Dapper.AmbientContext.Tests/AmbientDbContextLocatorTests.cs +++ b/test/Dapper.AmbientContext.Tests/AmbientDbContextLocatorTests.cs @@ -14,7 +14,7 @@ class When_ambient_database_context_stack_is_empty { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -48,7 +48,7 @@ class When_ambient_database_context_stack_has_one_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -89,7 +89,7 @@ class When_ambient_database_context_stack_has_more_than_one_ambient_database_con { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); diff --git a/test/Dapper.AmbientContext.Tests/AmbientDbContextStorageProviderTests.cs b/test/Dapper.AmbientContext.Tests/AmbientDbContextStorageProviderTests.cs index eeff9ff..15d278a 100644 --- a/test/Dapper.AmbientContext.Tests/AmbientDbContextStorageProviderTests.cs +++ b/test/Dapper.AmbientContext.Tests/AmbientDbContextStorageProviderTests.cs @@ -28,7 +28,7 @@ class When_getting_storage_after_it_has_been_set { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); diff --git a/test/Dapper.AmbientContext.Tests/AmbientDbContextTests.cs b/test/Dapper.AmbientContext.Tests/AmbientDbContextTests.cs index d41466d..d8336c5 100644 --- a/test/Dapper.AmbientContext.Tests/AmbientDbContextTests.cs +++ b/test/Dapper.AmbientContext.Tests/AmbientDbContextTests.cs @@ -16,7 +16,7 @@ class When_creating_first_ambient_database_context_with_transaction_suppression_ { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -69,7 +69,7 @@ class When_creating_multiple_joined_ambient_database_contexts_with_transaction_s { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -131,7 +131,7 @@ class When_creating_disjoined_ambient_database_contexts_with_transaction_suppres { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -194,7 +194,7 @@ class When_disposing_single_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -252,7 +252,7 @@ class When_disposing_single_ambient_database_context_without_explicit_commit { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -328,7 +328,7 @@ class When_disposing_multiple_joined_ambient_database_contexts { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -408,7 +408,7 @@ class When_disposing_multiple_disjoined_ambient_database_contexts { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -488,7 +488,7 @@ class When_disposing_multiple_joined_ambient_database_contexts_out_of_order { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -582,7 +582,7 @@ class When_committing_single_ambient_database_context_without_suppressed_transac { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -650,7 +650,7 @@ class When_committing_single_ambient_database_context_without_suppressed_transac { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -711,7 +711,7 @@ class When_committing_single_ambient_database_context_with_suppressed_transactio { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -767,7 +767,7 @@ class When_committing_joined_child_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -834,7 +834,7 @@ class When_committing_joined_parent_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -902,7 +902,7 @@ class When_the_joined_parent_ambient_database_context_requests_connection_first { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -964,7 +964,7 @@ class When_the_joined_child_ambient_database_context_requests_connection_first { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -1030,7 +1030,7 @@ class When_rolling_back_single_ambient_database_context_without_suppressed_trans { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -1091,7 +1091,7 @@ class When_rolling_back_single_ambient_database_context_with_suppressed_transact { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -1147,7 +1147,7 @@ class When_rolling_back_joined_child_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -1214,7 +1214,7 @@ class When_rolling_back_joined_parent_ambient_database_context { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -1282,7 +1282,7 @@ class When_rolling_back_single_ambient_database_context_without_suppressed_trans { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); diff --git a/test/Dapper.AmbientContext.Tests/ContextualStorageHelperTests.cs b/test/Dapper.AmbientContext.Tests/ContextualStorageHelperTests.cs index 06da2ba..347c269 100644 --- a/test/Dapper.AmbientContext.Tests/ContextualStorageHelperTests.cs +++ b/test/Dapper.AmbientContext.Tests/ContextualStorageHelperTests.cs @@ -14,7 +14,7 @@ class When_initializing_contextual_storage_helper { Establish context = () => { -#if NET451 +#if NET452 _storage = new LogicalCallContextStorage(); #else _storage = new AsyncLocalContextStorage(); @@ -50,7 +50,7 @@ class When_getting_an_empty_ambient_database_context_stack_from_the_contextual_s { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); @@ -84,7 +84,7 @@ class When_getting_non_empty_ambient_database_context_stack_from_the_contextual_ { Establish context = () => { -#if NET451 +#if NET452 AmbientDbContextStorageProvider.SetStorage(new LogicalCallContextStorage()); #else AmbientDbContextStorageProvider.SetStorage(new AsyncLocalContextStorage()); diff --git a/test/Dapper.AmbientContext.Tests/Dapper.AmbientContext.Tests.csproj b/test/Dapper.AmbientContext.Tests/Dapper.AmbientContext.Tests.csproj index facfe58..d01f3f5 100644 --- a/test/Dapper.AmbientContext.Tests/Dapper.AmbientContext.Tests.csproj +++ b/test/Dapper.AmbientContext.Tests/Dapper.AmbientContext.Tests.csproj @@ -1,30 +1,26 @@  - net451;netcoreapp1.1;netcoreapp2.0 + net452;netcoreapp1.1;netcoreapp2.1 + true - + - - - + + - + - - - - \ No newline at end of file diff --git a/test/Dapper.AmbientContext.Tests/LogicalCallContextStorageTests.cs b/test/Dapper.AmbientContext.Tests/LogicalCallContextStorageTests.cs index e853a5c..f70bf29 100644 --- a/test/Dapper.AmbientContext.Tests/LogicalCallContextStorageTests.cs +++ b/test/Dapper.AmbientContext.Tests/LogicalCallContextStorageTests.cs @@ -10,7 +10,7 @@ class When_getting_existing_item_from_logical_callcontext_storage { Establish context = () => { -#if NET451 +#if NET452 _storage = new LogicalCallContextStorage(); #else _storage = new AsyncLocalContextStorage(); @@ -43,7 +43,7 @@ class When_getting_inexisting_item_from_logical_callcontext_storage { Establish context = () => { -#if NET451 +#if NET452 _storage = new LogicalCallContextStorage(); #else _storage = new AsyncLocalContextStorage(); @@ -69,7 +69,7 @@ class When_checking_if_added_item_exists_in_the_logical_callcontext_storage { Establish context = () => { -#if NET451 +#if NET452 _storage = new LogicalCallContextStorage(); #else _storage = new AsyncLocalContextStorage(); @@ -102,7 +102,7 @@ class When_removing_an_item_from_the_logical_callcontext_storage { Establish context = () => { -#if NET451 +#if NET452 _storage = new LogicalCallContextStorage(); #else _storage = new AsyncLocalContextStorage();