From 7ed5bc82fc446ddaeed14c526fcde7bc5a65b28d Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Wed, 12 Jun 2024 09:17:35 +1000 Subject: [PATCH] Fix configuration order in tests (#3557) --- .../NativeSQLBulkOperationsWithCache.cs | 6 +++--- .../Circle/MultiPathCircleCascadeTest.cs | 1 - .../ConnectionTest/AggressiveReleaseTest.cs | 11 +++++----- .../Async/ConnectionTest/BatcherFixture.cs | 7 +++---- .../ReadonlyTests/QueryOverCacheableTests.cs | 1 - .../FetchLazyPropertiesFixture.cs | 1 - .../Async/Futures/FallbackFixture.cs | 3 +-- .../Identity/IdentityGeneratedKeysTest.cs | 1 - .../Async/Immutable/ImmutableTest.cs | 1 - .../Async/LazyGroup/LazyGroupFixture.cs | 1 - .../Async/Linq/ByMethod/GroupByHavingTests.cs | 1 - .../Async/Linq/ByMethod/OrderByTests.cs | 1 - .../Async/Linq/PreEvaluationTests.cs | 2 -- .../Async/Linq/QueryCacheableTests.cs | 7 +++---- .../Async/Linq/QueryFlushModeTests.cs | 1 - .../Async/Linq/QueryTimeoutTests.cs | 1 - .../DatabaseStrategyNoDbSpecificFixture.cs | 1 - .../Dates/DateTimeOffsetQueryFixture.cs | 1 - .../Fixture.cs | 1 - .../FileStreamSql2008/Fixture.cs | 4 ++-- .../Async/NHSpecificTest/GH1486/Fixture.cs | 1 - .../Async/NHSpecificTest/GH1496/Fixture.cs | 1 - .../Async/NHSpecificTest/GH1547/Fixture.cs | 2 -- .../Async/NHSpecificTest/GH1730/Fixture.cs | 2 +- .../CircularReferenceFetchDepth0Fixture.cs | 1 - .../CircularReferenceFetchDepthFixture.cs | 1 - .../NHSpecificTest/GH3113/FixtureByCode.cs | 2 -- .../NHSpecificTest/GH3176/FixtureByCode.cs | 1 - .../NHSpecificTest/GH3198/FixtureByCode.cs | 1 - .../NHSpecificTest/GH3215/FixtureByCode.cs | 1 - .../Async/NHSpecificTest/Logs/LogsFixture.cs | 1 - .../Async/NHSpecificTest/NH1001/Fixture.cs | 2 +- .../Async/NHSpecificTest/NH1101/Fixture.cs | 3 +-- .../Async/NHSpecificTest/NH1144/Fixture.cs | 5 +---- .../Async/NHSpecificTest/NH1452/Fixture.cs | 1 - .../SnapshotIsolationUpdateConflictTest.cs | 1 - .../NativeSqlCollectionLoaderFixture.cs | 1 - .../TestCollectionInitializingDuringFlush.cs | 1 - .../Async/NHSpecificTest/NH1989/Fixture.cs | 1 - .../Async/NHSpecificTest/NH2043/Fixture.cs | 1 - .../Async/NHSpecificTest/NH2055/Fixture.cs | 6 ------ .../Async/NHSpecificTest/NH2302/Fixture.cs | 21 ++++++++++--------- .../Async/NHSpecificTest/NH2318/Fixture.cs | 1 - .../NHSpecificTest/NH2439/NH2439Fixture.cs | 1 - .../Async/NHSpecificTest/NH2554/Fixture.cs | 1 - .../NHSpecificTest/NH2660And2661/Test.cs | 1 - .../Async/NHSpecificTest/NH2869/Fixture.cs | 3 +-- .../Async/NHSpecificTest/NH2898/Fixture.cs | 3 +-- .../Async/NHSpecificTest/NH3058/SampleTest.cs | 2 -- .../NHSpecificTest/NH3142/ChildrenTest.cs | 1 - .../Async/NHSpecificTest/NH3202/Fixture.cs | 6 +++--- .../Async/NHSpecificTest/NH3426/Fixture.cs | 2 -- .../NH3530/BatchFetchStyleFixture.cs | 1 - .../Async/NHSpecificTest/NH3848/Fixture.cs | 1 - .../NH3912/ReusableBatcherFixture.cs | 1 - .../NH4077/PostInsertFixture.cs | 1 - .../NH4077/PostUpdateFixture.cs | 1 - .../Immutable/ImmutableNaturalIdFixture.cs | 6 +++--- .../Mutable/MutableNaturalIdFixture.cs | 6 +++--- .../Async/Ondelete/JoinedSubclassFixture.cs | 4 ++-- .../Async/Ondelete/OnDeleteFixture.cs | 2 +- .../Async/Ondelete/ParentChildFixture.cs | 4 ++-- .../Async/Pagination/CustomDialectFixture.cs | 6 +++--- .../Async/Pagination/PaginationFixture.cs | 2 +- .../Async/QueryTest/MultiCriteriaFixture.cs | 2 -- .../SecondLevelCacheTest.cs | 3 +-- .../IdentityInsertWithStoredProcsTest.cs | 1 - .../Stateless/StatelessSessionQueryFixture.cs | 3 +-- .../SubselectFetchFixture.cs | 4 ++-- .../TypesTest/AbstractDateTimeTypeFixture.cs | 2 -- .../TypesTest/DateTimeOffsetTypeFixture.cs | 2 -- .../Async/TypesTest/DecimalTypeFixture.cs | 2 -- .../Unionsubclass/DatabaseKeywordsFixture.cs | 2 -- .../NativeSQLBulkOperationsWithCache.cs | 6 +++--- .../CacheTest/SyncOnlyCacheFixture.cs | 5 ++--- .../Circle/MultiPathCircleCascadeTest.cs | 1 - .../ConnectionTest/AggressiveReleaseTest.cs | 11 +++++----- .../AsyncLocalSessionContextFixture.cs | 3 +-- .../ConnectionTest/BatcherFixture.cs | 7 +++---- .../CustomCurrentSessionTest.cs | 3 +-- .../MapBasedSessionContextFixture.cs | 3 +-- .../ThreadLocalCurrentSessionTest.cs | 5 ++--- .../ThreadStaticSessionContextFixture.cs | 3 +-- .../ReadonlyTests/QueryOverCacheableTests.cs | 1 - .../FetchLazyPropertiesFixture.cs | 1 - .../Futures/FallbackFixture.cs | 3 +-- .../Identity/IdentityGeneratedKeysTest.cs | 1 - .../IdTest/UseIdentifierRollbackTest.cs | 3 +-- .../Immutable/ImmutableTest.cs | 1 - .../LazyGroup/LazyGroupFixture.cs | 1 - .../Linq/ByMethod/GroupByHavingTests.cs | 1 - .../Linq/ByMethod/OrderByTests.cs | 1 - .../Linq/PreEvaluationTests.cs | 2 -- .../Linq/QueryCacheableTests.cs | 7 +++---- .../Linq/QueryFlushModeTests.cs | 1 - src/NHibernate.Test/Linq/QueryTimeoutTests.cs | 1 - .../DatabaseStrategyNoDbSpecificFixture.cs | 1 - .../NHSpecificTest/BugTestCase.cs | 4 ++-- .../Dates/DateTimeOffsetQueryFixture.cs | 1 - .../Fixture.cs | 1 - .../FileStreamSql2008/Fixture.cs | 4 ++-- .../NHSpecificTest/GH1486/Fixture.cs | 1 - .../NHSpecificTest/GH1496/Fixture.cs | 1 - .../NHSpecificTest/GH1547/Fixture.cs | 2 -- .../NHSpecificTest/GH1730/Fixture.cs | 2 +- .../CircularReferenceFetchDepth0Fixture.cs | 1 - .../CircularReferenceFetchDepthFixture.cs | 1 - .../NHSpecificTest/GH3113/FixtureByCode.cs | 2 -- .../NHSpecificTest/GH3176/FixtureByCode.cs | 1 - .../NHSpecificTest/GH3198/FixtureByCode.cs | 1 - .../NHSpecificTest/GH3215/FixtureByCode.cs | 1 - .../NHSpecificTest/Logs/LogsFixture.cs | 1 - .../NHSpecificTest/NH1001/Fixture.cs | 2 +- .../NHSpecificTest/NH1101/Fixture.cs | 3 +-- .../NHSpecificTest/NH1144/Fixture.cs | 5 +---- .../NHSpecificTest/NH1230/Fixture.cs | 4 ++-- .../NHSpecificTest/NH1452/Fixture.cs | 1 - .../SnapshotIsolationUpdateConflictTest.cs | 1 - .../NativeSqlCollectionLoaderFixture.cs | 1 - .../NHSpecificTest/NH1849/Fixture.cs | 4 +--- .../TestCollectionInitializingDuringFlush.cs | 1 - .../NHSpecificTest/NH1989/Fixture.cs | 1 - .../NHSpecificTest/NH2043/Fixture.cs | 1 - .../NHSpecificTest/NH2055/Fixture.cs | 6 ------ .../NHSpecificTest/NH2302/Fixture.cs | 19 +++++++++-------- .../NHSpecificTest/NH2318/Fixture.cs | 1 - .../NHSpecificTest/NH2439/NH2439Fixture.cs | 1 - .../NHSpecificTest/NH2554/Fixture.cs | 1 - .../NH2583/AbstractMassTestingFixture.cs | 1 - .../NHSpecificTest/NH2660And2661/Test.cs | 1 - .../NHSpecificTest/NH2700/Fixture.cs | 2 +- .../NHSpecificTest/NH2869/Fixture.cs | 3 +-- .../NHSpecificTest/NH2898/Fixture.cs | 3 +-- .../NHSpecificTest/NH3058/SampleTest.cs | 2 -- .../NHSpecificTest/NH3142/ChildrenTest.cs | 1 - .../NHSpecificTest/NH3202/Fixture.cs | 6 +++--- .../NHSpecificTest/NH3426/Fixture.cs | 2 -- .../NHSpecificTest/NH3489/Fixture.cs | 1 - .../NH3530/BatchFetchStyleFixture.cs | 1 - .../NHSpecificTest/NH3848/Fixture.cs | 1 - .../NH3912/ReusableBatcherFixture.cs | 1 - .../NH4077/PostInsertFixture.cs | 1 - .../NH4077/PostUpdateFixture.cs | 1 - .../Immutable/ImmutableNaturalIdFixture.cs | 6 +++--- .../Mutable/MutableNaturalIdFixture.cs | 6 +++--- .../Ondelete/JoinedSubclassFixture.cs | 4 ++-- .../Ondelete/OnDeleteFixture.cs | 2 +- .../Ondelete/ParentChildFixture.cs | 4 ++-- .../Pagination/CustomDialectFixture.cs | 6 +++--- .../Pagination/PaginationFixture.cs | 2 +- .../QueryTest/MultiCriteriaFixture.cs | 2 -- .../ReadOnly/AbstractReadOnlyTest.cs | 1 - .../SecondLevelCacheTest.cs | 3 +-- .../IdentityInsertWithStoredProcsTest.cs | 1 - .../Stateless/StatelessSessionQueryFixture.cs | 3 +-- .../SubselectFetchFixture.cs | 4 ++-- src/NHibernate.Test/TestCase.cs | 4 ++-- .../TypesTest/AbstractDateTimeTypeFixture.cs | 2 -- .../TypesTest/ChangeDefaultTypeFixture.cs | 1 - .../ChangeDefaultTypeWithLengthFixture.cs | 1 - .../ChangeDefaultTypeWithPrecisionFixture.cs | 1 - .../TypesTest/DateTimeOffsetTypeFixture.cs | 2 -- .../TypesTest/DecimalTypeFixture.cs | 2 -- .../Unionsubclass/DatabaseKeywordsFixture.cs | 2 -- 164 files changed, 128 insertions(+), 293 deletions(-) diff --git a/src/NHibernate.Test/Async/BulkManipulation/NativeSQLBulkOperationsWithCache.cs b/src/NHibernate.Test/Async/BulkManipulation/NativeSQLBulkOperationsWithCache.cs index 4e75d4e63b6..9d451fa6da6 100644 --- a/src/NHibernate.Test/Async/BulkManipulation/NativeSQLBulkOperationsWithCache.cs +++ b/src/NHibernate.Test/Async/BulkManipulation/NativeSQLBulkOperationsWithCache.cs @@ -33,9 +33,9 @@ public class NativeSQLBulkOperationsWithCacheAsync : TestCase protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.CacheProvider, typeof(SubstituteCacheProvider).AssemblyQualifiedName); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.CacheProvider, typeof(SubstituteCacheProvider).AssemblyQualifiedName); } [Test] diff --git a/src/NHibernate.Test/Async/Cascade/Circle/MultiPathCircleCascadeTest.cs b/src/NHibernate.Test/Async/Cascade/Circle/MultiPathCircleCascadeTest.cs index 7d7a4a491d1..70134f8b0c8 100644 --- a/src/NHibernate.Test/Async/Cascade/Circle/MultiPathCircleCascadeTest.cs +++ b/src/NHibernate.Test/Async/Cascade/Circle/MultiPathCircleCascadeTest.cs @@ -54,7 +54,6 @@ protected override string[] Mappings protected override void Configure(NHibernate.Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "true"); configuration.SetProperty(NHibernate.Cfg.Environment.BatchSize, "0"); } diff --git a/src/NHibernate.Test/Async/ConnectionTest/AggressiveReleaseTest.cs b/src/NHibernate.Test/Async/ConnectionTest/AggressiveReleaseTest.cs index a0171cba778..55db59272b1 100644 --- a/src/NHibernate.Test/Async/ConnectionTest/AggressiveReleaseTest.cs +++ b/src/NHibernate.Test/Async/ConnectionTest/AggressiveReleaseTest.cs @@ -24,13 +24,12 @@ namespace NHibernate.Test.ConnectionTest [TestFixture] public class AggressiveReleaseTestAsync : ConnectionManagementTestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.ReleaseConnections, "after_transaction"); - //cfg.SetProperty(Environment.ConnectionProvider, typeof(DummyConnectionProvider).AssemblyQualifiedName); - //cfg.SetProperty(Environment.GenerateStatistics, "true"); - cfg.SetProperty(Environment.BatchSize, "0"); + configuration.SetProperty(Environment.ReleaseConnections, "after_transaction"); + //configuration.SetProperty(Environment.ConnectionProvider, typeof(DummyConnectionProvider).AssemblyQualifiedName); + //configuration.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.BatchSize, "0"); } protected override ISession GetSessionUnderTest() diff --git a/src/NHibernate.Test/Async/ConnectionTest/BatcherFixture.cs b/src/NHibernate.Test/Async/ConnectionTest/BatcherFixture.cs index 1145ecfe31c..18b0dc994b7 100644 --- a/src/NHibernate.Test/Async/ConnectionTest/BatcherFixture.cs +++ b/src/NHibernate.Test/Async/ConnectionTest/BatcherFixture.cs @@ -22,10 +22,9 @@ namespace NHibernate.Test.ConnectionTest [TestFixture] public class BatcherFixtureAsync : ConnectionManagementTestCase { - protected override void Configure(Configuration config) + protected override void Configure(Configuration configuration) { - base.Configure(config); - config.SetProperty(Environment.BatchSize, "10"); + configuration.SetProperty(Environment.BatchSize, "10"); } protected override ISession GetSessionUnderTest() @@ -53,4 +52,4 @@ public async Task CanCloseCommandsAndUseBatcherAsync() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Async/Criteria/ReadonlyTests/QueryOverCacheableTests.cs b/src/NHibernate.Test/Async/Criteria/ReadonlyTests/QueryOverCacheableTests.cs index b3f6e51b233..405750c3993 100644 --- a/src/NHibernate.Test/Async/Criteria/ReadonlyTests/QueryOverCacheableTests.cs +++ b/src/NHibernate.Test/Async/Criteria/ReadonlyTests/QueryOverCacheableTests.cs @@ -27,7 +27,6 @@ protected override void Configure(Configuration config) { config.SetProperty(Environment.UseQueryCache, "true"); config.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(config); } [Test] diff --git a/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs b/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs index 18df844bd71..aeb9eb71a9d 100644 --- a/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs +++ b/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs @@ -44,7 +44,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; } diff --git a/src/NHibernate.Test/Async/Futures/FallbackFixture.cs b/src/NHibernate.Test/Async/Futures/FallbackFixture.cs index 52f091d60b9..68e2c8603da 100644 --- a/src/NHibernate.Test/Async/Futures/FallbackFixture.cs +++ b/src/NHibernate.Test/Async/Futures/FallbackFixture.cs @@ -43,8 +43,7 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - using (var cp = ConnectionProviderFactory.NewConnectionProvider(cfg.Properties)) + using (var cp = ConnectionProviderFactory.NewConnectionProvider(configuration.Properties)) { if (cp.Driver is SqlClientDriver) { diff --git a/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs b/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs index 9756052f341..ea6dada5ab7 100644 --- a/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs +++ b/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs @@ -36,7 +36,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.GenerateStatistics, "true"); } diff --git a/src/NHibernate.Test/Async/Immutable/ImmutableTest.cs b/src/NHibernate.Test/Async/Immutable/ImmutableTest.cs index b75063bd44e..dec48eda73f 100644 --- a/src/NHibernate.Test/Async/Immutable/ImmutableTest.cs +++ b/src/NHibernate.Test/Async/Immutable/ImmutableTest.cs @@ -29,7 +29,6 @@ public class ImmutableTestAsync : TestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "true"); configuration.SetProperty(NHibernate.Cfg.Environment.BatchSize, "0"); } diff --git a/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs b/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs index 009ba2ba2d7..5f5a7f2fc15 100644 --- a/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs +++ b/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs @@ -30,7 +30,6 @@ public class LazyGroupFixtureAsync : TestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; configuration.Properties[Environment.GenerateStatistics] = "true"; diff --git a/src/NHibernate.Test/Async/Linq/ByMethod/GroupByHavingTests.cs b/src/NHibernate.Test/Async/Linq/ByMethod/GroupByHavingTests.cs index c7b618793e4..5a332bb9865 100644 --- a/src/NHibernate.Test/Async/Linq/ByMethod/GroupByHavingTests.cs +++ b/src/NHibernate.Test/Async/Linq/ByMethod/GroupByHavingTests.cs @@ -22,7 +22,6 @@ public class GroupByHavingTestsAsync : LinqTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Async/Linq/ByMethod/OrderByTests.cs b/src/NHibernate.Test/Async/Linq/ByMethod/OrderByTests.cs index 99a234a483a..b40a07f6159 100644 --- a/src/NHibernate.Test/Async/Linq/ByMethod/OrderByTests.cs +++ b/src/NHibernate.Test/Async/Linq/ByMethod/OrderByTests.cs @@ -22,7 +22,6 @@ public class OrderByTestsAsync : LinqTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Async/Linq/PreEvaluationTests.cs b/src/NHibernate.Test/Async/Linq/PreEvaluationTests.cs index 1f55f7b6cb8..4c16951e8a0 100644 --- a/src/NHibernate.Test/Async/Linq/PreEvaluationTests.cs +++ b/src/NHibernate.Test/Async/Linq/PreEvaluationTests.cs @@ -36,8 +36,6 @@ public PreEvaluationTestsAsync(bool legacy, bool fallback) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.FormatSql, "false"); configuration.SetProperty(Environment.LinqToHqlLegacyPreEvaluation, LegacyPreEvaluation.ToString()); configuration.SetProperty(Environment.LinqToHqlFallbackOnPreEvaluation, FallbackOnPreEvaluation.ToString()); diff --git a/src/NHibernate.Test/Async/Linq/QueryCacheableTests.cs b/src/NHibernate.Test/Async/Linq/QueryCacheableTests.cs index 3bc5fb1bedc..f8418a1c113 100644 --- a/src/NHibernate.Test/Async/Linq/QueryCacheableTests.cs +++ b/src/NHibernate.Test/Async/Linq/QueryCacheableTests.cs @@ -21,11 +21,10 @@ namespace NHibernate.Test.Linq [TestFixture] public class QueryCacheableTestsAsync : LinqTestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(cfg); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/Linq/QueryFlushModeTests.cs b/src/NHibernate.Test/Async/Linq/QueryFlushModeTests.cs index 54216c4642e..66f65c7bfab 100644 --- a/src/NHibernate.Test/Async/Linq/QueryFlushModeTests.cs +++ b/src/NHibernate.Test/Async/Linq/QueryFlushModeTests.cs @@ -22,7 +22,6 @@ public class QueryFlushModeTestsAsync : LinqTestCase protected override void Configure(Configuration configuration) { configuration.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(configuration); } [Test] diff --git a/src/NHibernate.Test/Async/Linq/QueryTimeoutTests.cs b/src/NHibernate.Test/Async/Linq/QueryTimeoutTests.cs index d7ae3c3917e..9bf5eaf04bf 100644 --- a/src/NHibernate.Test/Async/Linq/QueryTimeoutTests.cs +++ b/src/NHibernate.Test/Async/Linq/QueryTimeoutTests.cs @@ -32,7 +32,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.BatchStrategy, typeof(TimeoutCatchingNonBatchingBatcherFactory).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/Async/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs b/src/NHibernate.Test/Async/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs index 81f6b14b5cd..1734c5daaab 100644 --- a/src/NHibernate.Test/Async/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs +++ b/src/NHibernate.Test/Async/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs @@ -44,7 +44,6 @@ protected override void Configure(Configuration configuration) x.MultiTenancyConnectionProvider(); }); configuration.Properties[Cfg.Environment.GenerateStatistics] = "true"; - base.Configure(configuration); } private static void ValidateSqlServerConnectionAppName(ISession s, string tenantId) diff --git a/src/NHibernate.Test/Async/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs index 9485aff8ae1..f28d3983bc9 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs @@ -45,7 +45,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs index ddd35ad0018..b49f3a1dd85 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs @@ -32,7 +32,6 @@ protected override string MappingsAssembly protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.LinqToHqlGeneratorsRegistry(); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/FileStreamSql2008/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/FileStreamSql2008/Fixture.cs index 99930c1bdb5..bb1db7853e2 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/FileStreamSql2008/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/FileStreamSql2008/Fixture.cs @@ -39,10 +39,10 @@ protected override bool AppliesTo(Dialect.Dialect dialect) return dialect is MsSql2008Dialect; } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { //Points to the database created with FileStream Filegroup. - cfg.Properties["connection.connection_string"] = + configuration.Properties["connection.connection_string"] = @"Data Source=localhost\SQLEXPRESS;Initial Catalog=FileStreamDB;Integrated Security=True;Pooling=False"; #region CREATE DATABASE example diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH1486/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH1486/Fixture.cs index 69b6e469b6a..89a0d71729c 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH1486/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH1486/Fixture.cs @@ -24,7 +24,6 @@ public class FixtureAsync : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetInterceptor(_interceptor); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH1496/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH1496/Fixture.cs index 117d2290eb4..e3e0e0572ee 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH1496/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH1496/Fixture.cs @@ -28,7 +28,6 @@ public class FixtureAsync : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.AppendListeners(ListenerType.PostUpdate, new[] { _auditEventListener }); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs index a9b6818c04f..fc0c9255d40 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs @@ -34,8 +34,6 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); DriverForSubstitutedCommand.DriverClass = driverClass; diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH1730/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH1730/Fixture.cs index 3b9b66878df..dd7a05ab15d 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH1730/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH1730/Fixture.cs @@ -19,7 +19,7 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } protected override void OnTearDown() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs index 89586bfd9fb..1a71937cd19 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs @@ -26,7 +26,6 @@ public CircularReferenceFetchDepth0FixtureAsync() : base(0) protected override void Configure(Configuration configuration) { configuration.SetProperty("max_fetch_depth", "0"); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs index 5687c0cac44..6365722a0cc 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs @@ -28,7 +28,6 @@ public CircularReferenceFetchDepthFixtureAsync(int depth) : base(depth) protected override void Configure(Configuration configuration) { configuration.SetProperty("max_fetch_depth", _depth.ToString()); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH3113/FixtureByCode.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH3113/FixtureByCode.cs index 13702eb1171..2a140d31b9c 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH3113/FixtureByCode.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH3113/FixtureByCode.cs @@ -44,8 +44,6 @@ protected override void Configure(Configuration configuration) var dialect = NHibernate.Dialect.Dialect.GetDialect(configuration.Properties); if (dialect is Oracle8iDialect) configuration.SetProperty(Environment.Dialect, typeof(Oracle9iDialect).FullName); - - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH3176/FixtureByCode.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH3176/FixtureByCode.cs index 3694b370c39..c95a70f4286 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH3176/FixtureByCode.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH3176/FixtureByCode.cs @@ -60,7 +60,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; configuration.Properties[Environment.GenerateStatistics] = "true"; diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH3198/FixtureByCode.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH3198/FixtureByCode.cs index a95cbcebfca..76b11bac687 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH3198/FixtureByCode.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH3198/FixtureByCode.cs @@ -32,7 +32,6 @@ protected override void Configure(Configuration configuration) { new TestEventListener() }; - base.Configure(configuration); } protected override HbmMapping GetMappings() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH3215/FixtureByCode.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH3215/FixtureByCode.cs index 8d5772bf3d5..89ceb740018 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/GH3215/FixtureByCode.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/GH3215/FixtureByCode.cs @@ -45,7 +45,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.Hbm2ddlKeyWords, "auto-quote"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/Logs/LogsFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/Logs/LogsFixture.cs index b528d151b8f..d41df353d6f 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/Logs/LogsFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/Logs/LogsFixture.cs @@ -46,7 +46,6 @@ protected override string MappingsAssembly protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.UseSecondLevelCache, "false"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1001/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1001/Fixture.cs index 2fe3e8a8894..ec66ea4ef4c 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1001/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1001/Fixture.cs @@ -21,7 +21,7 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } private int employeeId; diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1101/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1101/Fixture.cs index 83fba185e25..56fecfc34d6 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1101/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1101/Fixture.cs @@ -22,8 +22,7 @@ public class FixtureAsync : BugTestCase protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1144/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1144/Fixture.cs index b5758daa27f..336968543bc 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1144/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1144/Fixture.cs @@ -21,12 +21,9 @@ namespace NHibernate.Test.NHSpecificTest.NH1144 [TestFixture] public class FixtureAsync : BugTestCase { - private Configuration configuration; - protected override void Configure(Configuration configuration) { - this.configuration = configuration; - this.configuration.Properties[Environment.BatchSize] = "10"; + configuration.Properties[Environment.BatchSize] = "10"; } [Test] diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1452/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1452/Fixture.cs index c9fad064581..3183f6ac993 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1452/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1452/Fixture.cs @@ -20,7 +20,6 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.FormatSql, "false"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs index c1643f9a028..ae3d6fa4b33 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs @@ -205,7 +205,6 @@ protected override void OnTearDown() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.SqlExceptionConverter, typeof (SQLUpdateConflictToStaleStateExceptionConverter).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs index 4687e62be28..34dec017aa4 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs @@ -24,7 +24,6 @@ public class NativeSqlCollectionLoaderFixtureAsync : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.UseQueryCache, WithQueryCache.ToString()); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs index 3f90814e610..e14abf73457 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs @@ -30,7 +30,6 @@ protected override void Configure(Configuration configuration) { listener }; - base.Configure(configuration); } protected override HbmMapping GetMappings() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH1989/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH1989/Fixture.cs index 48f8bf99ba5..92b05b1c650 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH1989/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH1989/Fixture.cs @@ -31,7 +31,6 @@ protected override bool AppliesTo(ISessionFactoryImplementor factory) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2043/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2043/Fixture.cs index 8d061a5b768..4d475edc44e 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2043/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2043/Fixture.cs @@ -30,7 +30,6 @@ public override string GetEntityName(object entity) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetInterceptor(new Namer()); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2055/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2055/Fixture.cs index 37e4fe39bc0..f4462e5589d 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2055/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2055/Fixture.cs @@ -27,12 +27,6 @@ protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) return (dialect is Dialect.MsSql2000Dialect); } - protected override void Configure(Configuration configuration) - { - base.Configure(configuration); - cfg = configuration; - } - [Test] public async Task CanCreateAndDropSchemaAsync() { diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2302/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2302/Fixture.cs index 49fb2b1ccd9..03ff2ce2f05 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2302/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2302/Fixture.cs @@ -9,6 +9,7 @@ using System.Data; +using NHibernate.Cfg; using NHibernate.Dialect; using NHibernate.Driver; using NHibernate.Mapping; @@ -17,30 +18,30 @@ namespace NHibernate.Test.NHSpecificTest.NH2302 { - using System.Threading.Tasks; - [TestFixture] - public class FixtureAsync : BugTestCase - { - protected override void Configure(Cfg.Configuration configuration) + using System.Threading.Tasks; + [TestFixture] + public class FixtureAsync : BugTestCase + { + protected override void AddMappings(Configuration configuration) { + base.AddMappings(configuration); + foreach (var cls in configuration.ClassMappings) { foreach (var prop in cls.PropertyIterator) { foreach (var col in prop.ColumnIterator) { - if (col is Column) + if (col is Column column && column.SqlType == "nvarchar(max)") { - var column = col as Column; - if (column.SqlType == "nvarchar(max)") - column.SqlType = Dialect.GetLongestTypeName(DbType.String); + column.SqlType = Dialect.GetLongestTypeName(DbType.String); } } } } } - protected override void OnTearDown() + protected override void OnTearDown() { CleanUp(); diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2318/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2318/Fixture.cs index 59a1d3d2cea..9a53bc89d6e 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2318/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2318/Fixture.cs @@ -25,7 +25,6 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty("linqtohql.generatorsregistry", "NHibernate.Test.NHSpecificTest.NH2318.ExtendedLinqtoHqlGeneratorsRegistry, NHibernate.Test"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2439/NH2439Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2439/NH2439Fixture.cs index 21019688492..479a108ca91 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2439/NH2439Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2439/NH2439Fixture.cs @@ -22,7 +22,6 @@ public class NH2439FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2554/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2554/Fixture.cs index 89b6b3be7bd..b5cc0370e13 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2554/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2554/Fixture.cs @@ -25,7 +25,6 @@ protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) protected override void Configure(NHibernate.Cfg.Configuration configuration) { configuration.SetProperty(NHibernate.Cfg.Environment.Hbm2ddlKeyWords, "keywords"); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2660And2661/Test.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2660And2661/Test.cs index d13589002f3..4eab3ee0a50 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2660And2661/Test.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2660And2661/Test.cs @@ -49,7 +49,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { // to be sure we are using the new drive - base.Configure(configuration); configuration.DataBaseIntegration(x=> x.Driver()); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2869/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2869/Fixture.cs index c3b2d51436a..9bfe3713a02 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2869/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2869/Fixture.cs @@ -23,7 +23,6 @@ public class FixtureAsync : BugTestCase protected override void Configure(Configuration configuration) { configuration.LinqToHqlGeneratorsRegistry(); - base.Configure(configuration); } protected override void OnSetUp() @@ -66,4 +65,4 @@ public async Task CustomExtensionWithConstantArgumentShouldBeIncludedInHqlProjec } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2898/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2898/Fixture.cs index ffa0243f311..618064daaeb 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH2898/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2898/Fixture.cs @@ -22,7 +22,6 @@ public class FixtureAsync : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(BinaryFormatterCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } @@ -114,4 +113,4 @@ public async Task SecondLevelCacheWithHqlQueriesAsync() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3058/SampleTest.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3058/SampleTest.cs index 0a66df764a6..07bbfd31c7b 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3058/SampleTest.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3058/SampleTest.cs @@ -19,8 +19,6 @@ public class SampleTestAsync : BugTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); - configuration.Properties.Add("current_session_context_class", "thread_static"); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs index 386428efd12..c6b733fc8a5 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs @@ -32,7 +32,6 @@ public ChildrenTestAsync(BatchFetchStyle fetchStyle) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.BatchFetchStyle, _fetchStyle.ToString()); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3202/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3202/Fixture.cs index 0cbd29f617b..d0fcc95b676 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3202/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3202/Fixture.cs @@ -27,11 +27,11 @@ protected override void Configure(Configuration configuration) if (!(Dialect is MsSql2008Dialect)) Assert.Ignore("Test is for MS SQL Server dialect only (custom dialect)."); - if (!typeof(SqlClientDriver).IsAssignableFrom(ReflectHelper.ClassForName(cfg.GetProperty(Environment.ConnectionDriver)))) + if (!typeof(SqlClientDriver).IsAssignableFrom(ReflectHelper.ClassForName(configuration.GetProperty(Environment.ConnectionDriver)))) Assert.Ignore("Test is for MS SQL Server driver only (custom driver is used)."); - cfg.SetProperty(Environment.Dialect, typeof(OffsetStartsAtOneTestDialect).AssemblyQualifiedName); - cfg.SetProperty(Environment.ConnectionDriver, typeof(OffsetTestDriver).AssemblyQualifiedName); + configuration.SetProperty(Environment.Dialect, typeof(OffsetStartsAtOneTestDialect).AssemblyQualifiedName); + configuration.SetProperty(Environment.ConnectionDriver, typeof(OffsetTestDriver).AssemblyQualifiedName); } private OffsetStartsAtOneTestDialect OffsetStartsAtOneTestDialect diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3426/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3426/Fixture.cs index afd515c3f44..6feae4bb697 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3426/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3426/Fixture.cs @@ -50,8 +50,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - if (Dialect is SQLiteDialect) { var connStr = configuration.Properties[Environment.ConnectionString]; diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs index be33442597b..af6afac0188 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs @@ -36,7 +36,6 @@ public BatchFetchStyleFixtureAsync(BatchFetchStyle fetchStyle) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.BatchFetchStyle, _fetchStyle.ToString()); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3848/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3848/Fixture.cs index 242e8fc5fd2..4acd25ea77d 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3848/Fixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3848/Fixture.cs @@ -88,7 +88,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Cache(c => { c.UseQueryCache = true; diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3912/ReusableBatcherFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3912/ReusableBatcherFixture.cs index d5bbb05a2be..f3a64b9ab29 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH3912/ReusableBatcherFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3912/ReusableBatcherFixture.cs @@ -47,7 +47,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.BatchStrategy, typeof(OracleDataClientBatchingBatcherFactory).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostInsertFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostInsertFixture.cs index b1cf11738ad..4581284ba4d 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostInsertFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostInsertFixture.cs @@ -73,7 +73,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); var existingListeners = (configuration.EventListeners.PostInsertEventListeners ?? Array.Empty()).ToList(); // this evil listener uses the session to perform a few queries and causes an auto-flush to happen existingListeners.Add(new CausesAutoflushListener()); diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostUpdateFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostUpdateFixture.cs index f2d2f9fc2ff..4ae7189d1c9 100644 --- a/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostUpdateFixture.cs +++ b/src/NHibernate.Test/Async/NHSpecificTest/NH4077/PostUpdateFixture.cs @@ -67,7 +67,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); var existingListeners = (configuration.EventListeners.PostUpdateEventListeners ?? Array.Empty()).ToList(); // this evil listener uses the session to perform a few queries and causes an auto-flush to happen existingListeners.Add(new CausesAutoflushListener()); diff --git a/src/NHibernate.Test/Async/Naturalid/Immutable/ImmutableNaturalIdFixture.cs b/src/NHibernate.Test/Async/Naturalid/Immutable/ImmutableNaturalIdFixture.cs index d3fccab6b8a..c8b15b5379f 100644 --- a/src/NHibernate.Test/Async/Naturalid/Immutable/ImmutableNaturalIdFixture.cs +++ b/src/NHibernate.Test/Async/Naturalid/Immutable/ImmutableNaturalIdFixture.cs @@ -30,9 +30,9 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/Naturalid/Mutable/MutableNaturalIdFixture.cs b/src/NHibernate.Test/Async/Naturalid/Mutable/MutableNaturalIdFixture.cs index 578f9cb2d9d..7d0e2729bb6 100644 --- a/src/NHibernate.Test/Async/Naturalid/Mutable/MutableNaturalIdFixture.cs +++ b/src/NHibernate.Test/Async/Naturalid/Mutable/MutableNaturalIdFixture.cs @@ -32,9 +32,9 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/Ondelete/JoinedSubclassFixture.cs b/src/NHibernate.Test/Async/Ondelete/JoinedSubclassFixture.cs index db43fd24e57..92bc30bfc3b 100644 --- a/src/NHibernate.Test/Async/Ondelete/JoinedSubclassFixture.cs +++ b/src/NHibernate.Test/Async/Ondelete/JoinedSubclassFixture.cs @@ -30,9 +30,9 @@ protected override string[] Mappings get { return new string[] { "Ondelete.EFGJoinedSubclass.hbm.xml" }; } } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/Ondelete/OnDeleteFixture.cs b/src/NHibernate.Test/Async/Ondelete/OnDeleteFixture.cs index 415190895fa..d7941caf38d 100644 --- a/src/NHibernate.Test/Async/Ondelete/OnDeleteFixture.cs +++ b/src/NHibernate.Test/Async/Ondelete/OnDeleteFixture.cs @@ -30,7 +30,7 @@ protected override string[] Mappings protected override void Configure(Cfg.Configuration configuration) { - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) diff --git a/src/NHibernate.Test/Async/Ondelete/ParentChildFixture.cs b/src/NHibernate.Test/Async/Ondelete/ParentChildFixture.cs index 9874cb0ce94..8bf34fa99ab 100644 --- a/src/NHibernate.Test/Async/Ondelete/ParentChildFixture.cs +++ b/src/NHibernate.Test/Async/Ondelete/ParentChildFixture.cs @@ -30,9 +30,9 @@ protected override string[] Mappings get { return new string[] { "Ondelete.ParentChild.hbm.xml" }; } } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/Pagination/CustomDialectFixture.cs b/src/NHibernate.Test/Async/Pagination/CustomDialectFixture.cs index c33de557a91..cf46df6bd03 100644 --- a/src/NHibernate.Test/Async/Pagination/CustomDialectFixture.cs +++ b/src/NHibernate.Test/Async/Pagination/CustomDialectFixture.cs @@ -41,12 +41,12 @@ protected override void Configure(Configuration configuration) // Configure is called before Applies, must check here. if (!(Dialect is MsSql2005Dialect)) Assert.Ignore("Test is for SQL dialect only"); - var driverClass = ReflectHelper.ClassForName(cfg.GetProperty(Environment.ConnectionDriver)); + var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Environment.ConnectionDriver)); if (!typeof(SqlClientDriver).IsAssignableFrom(driverClass)) Assert.Ignore("Test is compatible only with Sql Server Client driver connection strings"); - cfg.SetProperty(Environment.Dialect, typeof(CustomMsSqlDialect).AssemblyQualifiedName); - cfg.SetProperty(Environment.ConnectionDriver, typeof(CustomMsSqlDriver).AssemblyQualifiedName); + configuration.SetProperty(Environment.Dialect, typeof(CustomMsSqlDialect).AssemblyQualifiedName); + configuration.SetProperty(Environment.ConnectionDriver, typeof(CustomMsSqlDriver).AssemblyQualifiedName); } private CustomMsSqlDialect CustomDialect diff --git a/src/NHibernate.Test/Async/Pagination/PaginationFixture.cs b/src/NHibernate.Test/Async/Pagination/PaginationFixture.cs index 7921e7549da..fb9f4fc180c 100644 --- a/src/NHibernate.Test/Async/Pagination/PaginationFixture.cs +++ b/src/NHibernate.Test/Async/Pagination/PaginationFixture.cs @@ -34,7 +34,7 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.DefaultBatchFetchSize, "20"); + configuration.SetProperty(Environment.DefaultBatchFetchSize, "20"); } [Test] diff --git a/src/NHibernate.Test/Async/QueryTest/MultiCriteriaFixture.cs b/src/NHibernate.Test/Async/QueryTest/MultiCriteriaFixture.cs index 848ead9056e..e63d4372109 100644 --- a/src/NHibernate.Test/Async/QueryTest/MultiCriteriaFixture.cs +++ b/src/NHibernate.Test/Async/QueryTest/MultiCriteriaFixture.cs @@ -41,8 +41,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.GenerateStatistics, "true"); } diff --git a/src/NHibernate.Test/Async/SecondLevelCacheTest/SecondLevelCacheTest.cs b/src/NHibernate.Test/Async/SecondLevelCacheTest/SecondLevelCacheTest.cs index 344109b3954..1c963ebbeb8 100644 --- a/src/NHibernate.Test/Async/SecondLevelCacheTest/SecondLevelCacheTest.cs +++ b/src/NHibernate.Test/Async/SecondLevelCacheTest/SecondLevelCacheTest.cs @@ -35,7 +35,6 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } @@ -273,4 +272,4 @@ public async Task SecondLevelCacheWithHqlQueriesAsync() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Async/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs b/src/NHibernate.Test/Async/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs index ac20468608c..107bfe44729 100644 --- a/src/NHibernate.Test/Async/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs +++ b/src/NHibernate.Test/Async/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs @@ -24,7 +24,6 @@ protected override string MappingsAssembly protected override void Configure(NHibernate.Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.FormatSql, "false"); } diff --git a/src/NHibernate.Test/Async/Stateless/StatelessSessionQueryFixture.cs b/src/NHibernate.Test/Async/Stateless/StatelessSessionQueryFixture.cs index dc3c2189754..5f520fd4590 100644 --- a/src/NHibernate.Test/Async/Stateless/StatelessSessionQueryFixture.cs +++ b/src/NHibernate.Test/Async/Stateless/StatelessSessionQueryFixture.cs @@ -31,8 +31,7 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); - cfg.SetProperty(Environment.MaxFetchDepth, 1.ToString()); + configuration.SetProperty(Environment.MaxFetchDepth, 1.ToString()); } protected override bool AppliesTo(Dialect.Dialect dialect) diff --git a/src/NHibernate.Test/Async/SubselectFetchTest/SubselectFetchFixture.cs b/src/NHibernate.Test/Async/SubselectFetchTest/SubselectFetchFixture.cs index 2aa47a1b95d..87848c08536 100644 --- a/src/NHibernate.Test/Async/SubselectFetchTest/SubselectFetchFixture.cs +++ b/src/NHibernate.Test/Async/SubselectFetchTest/SubselectFetchFixture.cs @@ -20,9 +20,9 @@ namespace NHibernate.Test.SubselectFetchTest [TestFixture] public class SubselectFetchFixtureAsync : TestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Async/TypesTest/AbstractDateTimeTypeFixture.cs b/src/NHibernate.Test/Async/TypesTest/AbstractDateTimeTypeFixture.cs index 4307080f4cf..b3cbca7e1e3 100644 --- a/src/NHibernate.Test/Async/TypesTest/AbstractDateTimeTypeFixture.cs +++ b/src/NHibernate.Test/Async/TypesTest/AbstractDateTimeTypeFixture.cs @@ -40,8 +40,6 @@ public abstract class AbstractDateTimeTypeFixtureAsync : TypeFixtureBase protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); ClientDriverWithParamsStats.DriverClass = driverClass; diff --git a/src/NHibernate.Test/Async/TypesTest/DateTimeOffsetTypeFixture.cs b/src/NHibernate.Test/Async/TypesTest/DateTimeOffsetTypeFixture.cs index 1c604513d85..6ad79ddbd92 100644 --- a/src/NHibernate.Test/Async/TypesTest/DateTimeOffsetTypeFixture.cs +++ b/src/NHibernate.Test/Async/TypesTest/DateTimeOffsetTypeFixture.cs @@ -42,8 +42,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) => protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); ClientDriverWithParamsStats.DriverClass = driverClass; diff --git a/src/NHibernate.Test/Async/TypesTest/DecimalTypeFixture.cs b/src/NHibernate.Test/Async/TypesTest/DecimalTypeFixture.cs index 1917cbd0b4b..2b5f1ef3c38 100644 --- a/src/NHibernate.Test/Async/TypesTest/DecimalTypeFixture.cs +++ b/src/NHibernate.Test/Async/TypesTest/DecimalTypeFixture.cs @@ -33,8 +33,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - if (Dialect is FirebirdDialect) { configuration.SetProperty(Environment.QueryDefaultCastPrecision, "18"); diff --git a/src/NHibernate.Test/Async/Unionsubclass/DatabaseKeywordsFixture.cs b/src/NHibernate.Test/Async/Unionsubclass/DatabaseKeywordsFixture.cs index d8a2c5ea89c..303012d48b0 100644 --- a/src/NHibernate.Test/Async/Unionsubclass/DatabaseKeywordsFixture.cs +++ b/src/NHibernate.Test/Async/Unionsubclass/DatabaseKeywordsFixture.cs @@ -30,8 +30,6 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.Hbm2ddlKeyWords, "auto-quote"); } diff --git a/src/NHibernate.Test/BulkManipulation/NativeSQLBulkOperationsWithCache.cs b/src/NHibernate.Test/BulkManipulation/NativeSQLBulkOperationsWithCache.cs index f6b7887b665..fda256b835a 100644 --- a/src/NHibernate.Test/BulkManipulation/NativeSQLBulkOperationsWithCache.cs +++ b/src/NHibernate.Test/BulkManipulation/NativeSQLBulkOperationsWithCache.cs @@ -22,9 +22,9 @@ public class NativeSQLBulkOperationsWithCache : TestCase protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.CacheProvider, typeof(SubstituteCacheProvider).AssemblyQualifiedName); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.CacheProvider, typeof(SubstituteCacheProvider).AssemblyQualifiedName); } [Test] diff --git a/src/NHibernate.Test/CacheTest/SyncOnlyCacheFixture.cs b/src/NHibernate.Test/CacheTest/SyncOnlyCacheFixture.cs index 267b74d015a..3adccdf0f53 100644 --- a/src/NHibernate.Test/CacheTest/SyncOnlyCacheFixture.cs +++ b/src/NHibernate.Test/CacheTest/SyncOnlyCacheFixture.cs @@ -11,10 +11,9 @@ namespace NHibernate.Test.CacheTest [TestFixture] public class SyncOnlyCacheFixture : CacheFixture { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CacheReadWriteLockFactory, "sync"); + configuration.SetProperty(Environment.CacheReadWriteLockFactory, "sync"); } [Test] diff --git a/src/NHibernate.Test/Cascade/Circle/MultiPathCircleCascadeTest.cs b/src/NHibernate.Test/Cascade/Circle/MultiPathCircleCascadeTest.cs index 06d190ba08c..1773d6448f5 100644 --- a/src/NHibernate.Test/Cascade/Circle/MultiPathCircleCascadeTest.cs +++ b/src/NHibernate.Test/Cascade/Circle/MultiPathCircleCascadeTest.cs @@ -42,7 +42,6 @@ protected override string[] Mappings protected override void Configure(NHibernate.Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "true"); configuration.SetProperty(NHibernate.Cfg.Environment.BatchSize, "0"); } diff --git a/src/NHibernate.Test/ConnectionTest/AggressiveReleaseTest.cs b/src/NHibernate.Test/ConnectionTest/AggressiveReleaseTest.cs index bc0df5c5a65..0111d194ae6 100644 --- a/src/NHibernate.Test/ConnectionTest/AggressiveReleaseTest.cs +++ b/src/NHibernate.Test/ConnectionTest/AggressiveReleaseTest.cs @@ -12,13 +12,12 @@ namespace NHibernate.Test.ConnectionTest [TestFixture] public class AggressiveReleaseTest : ConnectionManagementTestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.ReleaseConnections, "after_transaction"); - //cfg.SetProperty(Environment.ConnectionProvider, typeof(DummyConnectionProvider).AssemblyQualifiedName); - //cfg.SetProperty(Environment.GenerateStatistics, "true"); - cfg.SetProperty(Environment.BatchSize, "0"); + configuration.SetProperty(Environment.ReleaseConnections, "after_transaction"); + //configuration.SetProperty(Environment.ConnectionProvider, typeof(DummyConnectionProvider).AssemblyQualifiedName); + //configuration.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.BatchSize, "0"); } protected override ISession GetSessionUnderTest() diff --git a/src/NHibernate.Test/ConnectionTest/AsyncLocalSessionContextFixture.cs b/src/NHibernate.Test/ConnectionTest/AsyncLocalSessionContextFixture.cs index f39f344ce62..d11c69f711c 100644 --- a/src/NHibernate.Test/ConnectionTest/AsyncLocalSessionContextFixture.cs +++ b/src/NHibernate.Test/ConnectionTest/AsyncLocalSessionContextFixture.cs @@ -17,8 +17,7 @@ protected override ISession GetSessionUnderTest() protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CurrentSessionContextClass, "async_local"); + configuration.SetProperty(Environment.CurrentSessionContextClass, "async_local"); } [Test] diff --git a/src/NHibernate.Test/ConnectionTest/BatcherFixture.cs b/src/NHibernate.Test/ConnectionTest/BatcherFixture.cs index d96a7c205d5..b887d83a440 100644 --- a/src/NHibernate.Test/ConnectionTest/BatcherFixture.cs +++ b/src/NHibernate.Test/ConnectionTest/BatcherFixture.cs @@ -11,10 +11,9 @@ namespace NHibernate.Test.ConnectionTest [TestFixture] public class BatcherFixture : ConnectionManagementTestCase { - protected override void Configure(Configuration config) + protected override void Configure(Configuration configuration) { - base.Configure(config); - config.SetProperty(Environment.BatchSize, "10"); + configuration.SetProperty(Environment.BatchSize, "10"); } protected override ISession GetSessionUnderTest() @@ -42,4 +41,4 @@ public void CanCloseCommandsAndUseBatcher() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ConnectionTest/CustomCurrentSessionTest.cs b/src/NHibernate.Test/ConnectionTest/CustomCurrentSessionTest.cs index b22dcd6cd25..73a0bdce75b 100644 --- a/src/NHibernate.Test/ConnectionTest/CustomCurrentSessionTest.cs +++ b/src/NHibernate.Test/ConnectionTest/CustomCurrentSessionTest.cs @@ -17,8 +17,7 @@ protected override ISession GetSessionUnderTest() protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CurrentSessionContextClass, typeof(CustomContext).AssemblyQualifiedName); + configuration.SetProperty(Environment.CurrentSessionContextClass, typeof(CustomContext).AssemblyQualifiedName); } protected override void Release(ISession session) diff --git a/src/NHibernate.Test/ConnectionTest/MapBasedSessionContextFixture.cs b/src/NHibernate.Test/ConnectionTest/MapBasedSessionContextFixture.cs index bd4fa61e38a..1893a2be2e9 100644 --- a/src/NHibernate.Test/ConnectionTest/MapBasedSessionContextFixture.cs +++ b/src/NHibernate.Test/ConnectionTest/MapBasedSessionContextFixture.cs @@ -19,8 +19,7 @@ protected override ISession GetSessionUnderTest() protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CurrentSessionContextClass, typeof(TestableMapBasedSessionContext).AssemblyQualifiedName); + configuration.SetProperty(Environment.CurrentSessionContextClass, typeof(TestableMapBasedSessionContext).AssemblyQualifiedName); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/ConnectionTest/ThreadLocalCurrentSessionTest.cs b/src/NHibernate.Test/ConnectionTest/ThreadLocalCurrentSessionTest.cs index afd05fab790..59fafad6390 100644 --- a/src/NHibernate.Test/ConnectionTest/ThreadLocalCurrentSessionTest.cs +++ b/src/NHibernate.Test/ConnectionTest/ThreadLocalCurrentSessionTest.cs @@ -17,9 +17,8 @@ protected override ISession GetSessionUnderTest() protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CurrentSessionContextClass, typeof (TestableThreadLocalContext).AssemblyQualifiedName); - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.CurrentSessionContextClass, typeof (TestableThreadLocalContext).AssemblyQualifiedName); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } protected override void Release(ISession session) diff --git a/src/NHibernate.Test/ConnectionTest/ThreadStaticSessionContextFixture.cs b/src/NHibernate.Test/ConnectionTest/ThreadStaticSessionContextFixture.cs index c2cad0ea0ef..7ec9bef8e68 100644 --- a/src/NHibernate.Test/ConnectionTest/ThreadStaticSessionContextFixture.cs +++ b/src/NHibernate.Test/ConnectionTest/ThreadStaticSessionContextFixture.cs @@ -19,8 +19,7 @@ protected override ISession GetSessionUnderTest() protected override void Configure(Configuration configuration) { - base.Configure(cfg); - cfg.SetProperty(Environment.CurrentSessionContextClass, "thread_static"); + configuration.SetProperty(Environment.CurrentSessionContextClass, "thread_static"); } [Test] diff --git a/src/NHibernate.Test/Criteria/ReadonlyTests/QueryOverCacheableTests.cs b/src/NHibernate.Test/Criteria/ReadonlyTests/QueryOverCacheableTests.cs index 749a5184354..7c4e17de210 100644 --- a/src/NHibernate.Test/Criteria/ReadonlyTests/QueryOverCacheableTests.cs +++ b/src/NHibernate.Test/Criteria/ReadonlyTests/QueryOverCacheableTests.cs @@ -16,7 +16,6 @@ protected override void Configure(Configuration config) { config.SetProperty(Environment.UseQueryCache, "true"); config.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(config); } [Test] diff --git a/src/NHibernate.Test/FetchLazyProperties/FetchLazyPropertiesFixture.cs b/src/NHibernate.Test/FetchLazyProperties/FetchLazyPropertiesFixture.cs index f05c462e5c8..1fd3b8ed063 100644 --- a/src/NHibernate.Test/FetchLazyProperties/FetchLazyPropertiesFixture.cs +++ b/src/NHibernate.Test/FetchLazyProperties/FetchLazyPropertiesFixture.cs @@ -33,7 +33,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; } diff --git a/src/NHibernate.Test/Futures/FallbackFixture.cs b/src/NHibernate.Test/Futures/FallbackFixture.cs index b7fa34759a7..d9042acc6ce 100644 --- a/src/NHibernate.Test/Futures/FallbackFixture.cs +++ b/src/NHibernate.Test/Futures/FallbackFixture.cs @@ -35,8 +35,7 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - using (var cp = ConnectionProviderFactory.NewConnectionProvider(cfg.Properties)) + using (var cp = ConnectionProviderFactory.NewConnectionProvider(configuration.Properties)) { if (cp.Driver is SqlClientDriver) { diff --git a/src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs b/src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs index 7eb3f8eb7d6..d197c037825 100644 --- a/src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs +++ b/src/NHibernate.Test/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs @@ -25,7 +25,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.GenerateStatistics, "true"); } diff --git a/src/NHibernate.Test/IdTest/UseIdentifierRollbackTest.cs b/src/NHibernate.Test/IdTest/UseIdentifierRollbackTest.cs index 77ade682908..5f623d9652c 100644 --- a/src/NHibernate.Test/IdTest/UseIdentifierRollbackTest.cs +++ b/src/NHibernate.Test/IdTest/UseIdentifierRollbackTest.cs @@ -20,8 +20,7 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseIdentifierRollBack, "true"); - base.Configure(configuration); + configuration.SetProperty(Environment.UseIdentifierRollBack, "true"); } public void SimpleRollback() diff --git a/src/NHibernate.Test/Immutable/ImmutableTest.cs b/src/NHibernate.Test/Immutable/ImmutableTest.cs index 214252925b1..18f476411d9 100644 --- a/src/NHibernate.Test/Immutable/ImmutableTest.cs +++ b/src/NHibernate.Test/Immutable/ImmutableTest.cs @@ -17,7 +17,6 @@ public class ImmutableTest : TestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "true"); configuration.SetProperty(NHibernate.Cfg.Environment.BatchSize, "0"); } diff --git a/src/NHibernate.Test/LazyGroup/LazyGroupFixture.cs b/src/NHibernate.Test/LazyGroup/LazyGroupFixture.cs index 7f52de482e4..a0ff97f8a70 100644 --- a/src/NHibernate.Test/LazyGroup/LazyGroupFixture.cs +++ b/src/NHibernate.Test/LazyGroup/LazyGroupFixture.cs @@ -19,7 +19,6 @@ public class LazyGroupFixture : TestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; configuration.Properties[Environment.GenerateStatistics] = "true"; diff --git a/src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs b/src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs index 7e6258bfcaf..7b83694fcca 100644 --- a/src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs +++ b/src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs @@ -10,7 +10,6 @@ public class GroupByHavingTests : LinqTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs b/src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs index 01e21c1d1cd..a45b8d18c9f 100644 --- a/src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs +++ b/src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs @@ -10,7 +10,6 @@ public class OrderByTests : LinqTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/Linq/PreEvaluationTests.cs b/src/NHibernate.Test/Linq/PreEvaluationTests.cs index 9284938842d..f0698f15906 100644 --- a/src/NHibernate.Test/Linq/PreEvaluationTests.cs +++ b/src/NHibernate.Test/Linq/PreEvaluationTests.cs @@ -24,8 +24,6 @@ public PreEvaluationTests(bool legacy, bool fallback) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.FormatSql, "false"); configuration.SetProperty(Environment.LinqToHqlLegacyPreEvaluation, LegacyPreEvaluation.ToString()); configuration.SetProperty(Environment.LinqToHqlFallbackOnPreEvaluation, FallbackOnPreEvaluation.ToString()); diff --git a/src/NHibernate.Test/Linq/QueryCacheableTests.cs b/src/NHibernate.Test/Linq/QueryCacheableTests.cs index de4529091bf..779a4514f3a 100644 --- a/src/NHibernate.Test/Linq/QueryCacheableTests.cs +++ b/src/NHibernate.Test/Linq/QueryCacheableTests.cs @@ -10,11 +10,10 @@ namespace NHibernate.Test.Linq [TestFixture] public class QueryCacheableTests : LinqTestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(cfg); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Linq/QueryFlushModeTests.cs b/src/NHibernate.Test/Linq/QueryFlushModeTests.cs index 796a76bf0e0..9eb896ab4e3 100644 --- a/src/NHibernate.Test/Linq/QueryFlushModeTests.cs +++ b/src/NHibernate.Test/Linq/QueryFlushModeTests.cs @@ -11,7 +11,6 @@ public class QueryFlushModeTests : LinqTestCase protected override void Configure(Configuration configuration) { configuration.SetProperty(Environment.GenerateStatistics, "true"); - base.Configure(configuration); } [Test] diff --git a/src/NHibernate.Test/Linq/QueryTimeoutTests.cs b/src/NHibernate.Test/Linq/QueryTimeoutTests.cs index bf6ba97bec5..5b74ae4bf20 100644 --- a/src/NHibernate.Test/Linq/QueryTimeoutTests.cs +++ b/src/NHibernate.Test/Linq/QueryTimeoutTests.cs @@ -22,7 +22,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.BatchStrategy, typeof(TimeoutCatchingNonBatchingBatcherFactory).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs b/src/NHibernate.Test/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs index fcd93d71595..32ddae24c52 100644 --- a/src/NHibernate.Test/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs +++ b/src/NHibernate.Test/MultiTenancy/DatabaseStrategyNoDbSpecificFixture.cs @@ -32,7 +32,6 @@ protected override void Configure(Configuration configuration) x.MultiTenancyConnectionProvider(); }); configuration.Properties[Cfg.Environment.GenerateStatistics] = "true"; - base.Configure(configuration); } [Test] diff --git a/src/NHibernate.Test/NHSpecificTest/BugTestCase.cs b/src/NHibernate.Test/NHSpecificTest/BugTestCase.cs index 76a18409c8e..3b0783d17c8 100644 --- a/src/NHibernate.Test/NHSpecificTest/BugTestCase.cs +++ b/src/NHibernate.Test/NHSpecificTest/BugTestCase.cs @@ -15,7 +15,7 @@ public abstract class BugTestCase : TestCase protected sealed override string MappingsAssembly => throw new InvalidOperationException("BugTestCase does not support overriding mapping assembly."); - protected sealed override void AddMappings(Configuration configuration) + protected override void AddMappings(Configuration configuration) { var mappings = Mappings; if (mappings == null || mappings.Length == 0) @@ -26,4 +26,4 @@ protected sealed override void AddMappings(Configuration configuration) configuration.AddResource(type.Namespace + "." + file, type.Assembly); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs b/src/NHibernate.Test/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs index 096419a336e..cfbc9094e22 100644 --- a/src/NHibernate.Test/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Dates/DateTimeOffsetQueryFixture.cs @@ -34,7 +34,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs index 66e1a522eb5..abf6cd31583 100644 --- a/src/NHibernate.Test/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/EntityWithUserTypeCanHaveLinqGenerators/Fixture.cs @@ -21,7 +21,6 @@ protected override string MappingsAssembly protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.LinqToHqlGeneratorsRegistry(); } diff --git a/src/NHibernate.Test/NHSpecificTest/FileStreamSql2008/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/FileStreamSql2008/Fixture.cs index 1d6d19132d1..f13d1ef9a4f 100644 --- a/src/NHibernate.Test/NHSpecificTest/FileStreamSql2008/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/FileStreamSql2008/Fixture.cs @@ -28,10 +28,10 @@ protected override bool AppliesTo(Dialect.Dialect dialect) return dialect is MsSql2008Dialect; } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { //Points to the database created with FileStream Filegroup. - cfg.Properties["connection.connection_string"] = + configuration.Properties["connection.connection_string"] = @"Data Source=localhost\SQLEXPRESS;Initial Catalog=FileStreamDB;Integrated Security=True;Pooling=False"; #region CREATE DATABASE example diff --git a/src/NHibernate.Test/NHSpecificTest/GH1486/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/GH1486/Fixture.cs index 85a727f1ec6..e395d644b15 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1486/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH1486/Fixture.cs @@ -12,7 +12,6 @@ public class Fixture : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetInterceptor(_interceptor); } diff --git a/src/NHibernate.Test/NHSpecificTest/GH1496/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/GH1496/Fixture.cs index 73c3be88fe8..a1be5480b81 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1496/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH1496/Fixture.cs @@ -17,7 +17,6 @@ public class Fixture : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.AppendListeners(ListenerType.PostUpdate, new[] { _auditEventListener }); } diff --git a/src/NHibernate.Test/NHSpecificTest/GH1547/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/GH1547/Fixture.cs index 22267fb030c..b4d3d2ee329 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1547/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH1547/Fixture.cs @@ -22,8 +22,6 @@ public class Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); DriverForSubstitutedCommand.DriverClass = driverClass; diff --git a/src/NHibernate.Test/NHSpecificTest/GH1730/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/GH1730/Fixture.cs index 7d69c1c48bb..93e294a4067 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1730/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH1730/Fixture.cs @@ -8,7 +8,7 @@ public class Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } protected override void OnTearDown() diff --git a/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs b/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs index d32bf89a58a..a9c4270ade2 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepth0Fixture.cs @@ -15,7 +15,6 @@ public CircularReferenceFetchDepth0Fixture() : base(0) protected override void Configure(Configuration configuration) { configuration.SetProperty("max_fetch_depth", "0"); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs b/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs index 68f834e4c02..f3fc4942303 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH2201/CircularReferenceFetchDepthFixture.cs @@ -17,7 +17,6 @@ public CircularReferenceFetchDepthFixture(int depth) : base(depth) protected override void Configure(Configuration configuration) { configuration.SetProperty("max_fetch_depth", _depth.ToString()); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/NHSpecificTest/GH3113/FixtureByCode.cs b/src/NHibernate.Test/NHSpecificTest/GH3113/FixtureByCode.cs index 0138c8b8d27..f6a5d0536bb 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH3113/FixtureByCode.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH3113/FixtureByCode.cs @@ -32,8 +32,6 @@ protected override void Configure(Configuration configuration) var dialect = NHibernate.Dialect.Dialect.GetDialect(configuration.Properties); if (dialect is Oracle8iDialect) configuration.SetProperty(Environment.Dialect, typeof(Oracle9iDialect).FullName); - - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/NHSpecificTest/GH3176/FixtureByCode.cs b/src/NHibernate.Test/NHSpecificTest/GH3176/FixtureByCode.cs index 18d56ce0b9a..0ef4c9e7029 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH3176/FixtureByCode.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH3176/FixtureByCode.cs @@ -49,7 +49,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseSecondLevelCache] = "true"; configuration.Properties[Environment.GenerateStatistics] = "true"; diff --git a/src/NHibernate.Test/NHSpecificTest/GH3198/FixtureByCode.cs b/src/NHibernate.Test/NHSpecificTest/GH3198/FixtureByCode.cs index 5702dec91da..1220858af09 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH3198/FixtureByCode.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH3198/FixtureByCode.cs @@ -22,7 +22,6 @@ protected override void Configure(Configuration configuration) { new TestEventListener() }; - base.Configure(configuration); } protected override HbmMapping GetMappings() diff --git a/src/NHibernate.Test/NHSpecificTest/GH3215/FixtureByCode.cs b/src/NHibernate.Test/NHSpecificTest/GH3215/FixtureByCode.cs index 9935fd79940..49c6953e049 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH3215/FixtureByCode.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH3215/FixtureByCode.cs @@ -34,7 +34,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.Hbm2ddlKeyWords, "auto-quote"); } diff --git a/src/NHibernate.Test/NHSpecificTest/Logs/LogsFixture.cs b/src/NHibernate.Test/NHSpecificTest/Logs/LogsFixture.cs index 5ec72b4aa9e..bbdf7c4add0 100644 --- a/src/NHibernate.Test/NHSpecificTest/Logs/LogsFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Logs/LogsFixture.cs @@ -35,7 +35,6 @@ protected override string MappingsAssembly protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.UseSecondLevelCache, "false"); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1001/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1001/Fixture.cs index 1dabda7a0ef..7294b508928 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1001/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1001/Fixture.cs @@ -10,7 +10,7 @@ public class Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } private int employeeId; diff --git a/src/NHibernate.Test/NHSpecificTest/NH1101/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1101/Fixture.cs index 75b8e5d8765..f14cb381461 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1101/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1101/Fixture.cs @@ -11,8 +11,7 @@ public class Fixture : BugTestCase protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/NHSpecificTest/NH1144/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1144/Fixture.cs index 092b7f9ead5..dfc95472917 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1144/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1144/Fixture.cs @@ -10,12 +10,9 @@ namespace NHibernate.Test.NHSpecificTest.NH1144 [TestFixture] public class Fixture : BugTestCase { - private Configuration configuration; - protected override void Configure(Configuration configuration) { - this.configuration = configuration; - this.configuration.Properties[Environment.BatchSize] = "10"; + configuration.Properties[Environment.BatchSize] = "10"; } [Test] diff --git a/src/NHibernate.Test/NHSpecificTest/NH1230/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1230/Fixture.cs index dc8e2d841a1..0a5ee99fbb8 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1230/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1230/Fixture.cs @@ -7,9 +7,9 @@ namespace NHibernate.Test.NHSpecificTest.NH1230 [TestFixture,Ignore("TODO(Dario)This test demostrate the need of eliminate the 'bool' on pre-insert eventlisteners.")] public class Fixture : BugTestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetListener(ListenerType.PreInsert, new PreSaveDoVeto()); + configuration.SetListener(ListenerType.PreInsert, new PreSaveDoVeto()); } /// diff --git a/src/NHibernate.Test/NHSpecificTest/NH1452/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1452/Fixture.cs index d82d0ceae14..4f83381cce8 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1452/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1452/Fixture.cs @@ -9,7 +9,6 @@ public class Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.FormatSql, "false"); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs b/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs index 28f81cea773..9563b583fef 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1553/MsSQL/SnapshotIsolationUpdateConflictTest.cs @@ -182,7 +182,6 @@ protected override void OnTearDown() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.SqlExceptionConverter, typeof (SQLUpdateConflictToStaleStateExceptionConverter).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs index fd7fa20ce5f..fd3d0460e06 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs @@ -12,7 +12,6 @@ public class NativeSqlCollectionLoaderFixture : BugTestCase protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.UseQueryCache, WithQueryCache.ToString()); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1849/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1849/Fixture.cs index 88eac03b442..321b1c25833 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1849/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1849/Fixture.cs @@ -29,8 +29,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - // Ugly hack. _OrignalDialectIsMsSql2005Dialect = Regex.IsMatch(configuration.GetProperty("dialect"), "MsSql200(5|8)Dialect"); @@ -53,4 +51,4 @@ public void ExecutesCustomSqlFunctionContains() Assert.AreEqual(1, plan.SqlStrings.Length); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs b/src/NHibernate.Test/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs index 6f6804197b0..1174e67fe79 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1882/TestCollectionInitializingDuringFlush.cs @@ -18,7 +18,6 @@ protected override void Configure(Configuration configuration) { listener }; - base.Configure(configuration); } protected override HbmMapping GetMappings() diff --git a/src/NHibernate.Test/NHSpecificTest/NH1989/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1989/Fixture.cs index 7b1ac3f7be7..d294510bce9 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1989/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1989/Fixture.cs @@ -19,7 +19,6 @@ protected override bool AppliesTo(ISessionFactoryImplementor factory) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2043/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2043/Fixture.cs index 83bb483dda8..a9b616424bd 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2043/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2043/Fixture.cs @@ -19,7 +19,6 @@ public override string GetEntityName(object entity) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetInterceptor(new Namer()); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2055/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2055/Fixture.cs index 54ed1c463ea..169cd406adb 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2055/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2055/Fixture.cs @@ -16,12 +16,6 @@ protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) return (dialect is Dialect.MsSql2000Dialect); } - protected override void Configure(Configuration configuration) - { - base.Configure(configuration); - cfg = configuration; - } - [Test] public void CanCreateAndDropSchema() { diff --git a/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs index d214b5655f6..ddb45bbf22e 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs @@ -1,4 +1,5 @@ using System.Data; +using NHibernate.Cfg; using NHibernate.Dialect; using NHibernate.Driver; using NHibernate.Mapping; @@ -7,29 +8,29 @@ namespace NHibernate.Test.NHSpecificTest.NH2302 { - [TestFixture] - public class Fixture : BugTestCase - { - protected override void Configure(Cfg.Configuration configuration) + [TestFixture] + public class Fixture : BugTestCase + { + protected override void AddMappings(Configuration configuration) { + base.AddMappings(configuration); + foreach (var cls in configuration.ClassMappings) { foreach (var prop in cls.PropertyIterator) { foreach (var col in prop.ColumnIterator) { - if (col is Column) + if (col is Column column && column.SqlType == "nvarchar(max)") { - var column = col as Column; - if (column.SqlType == "nvarchar(max)") - column.SqlType = Dialect.GetLongestTypeName(DbType.String); + column.SqlType = Dialect.GetLongestTypeName(DbType.String); } } } } } - protected override void OnTearDown() + protected override void OnTearDown() { CleanUp(); diff --git a/src/NHibernate.Test/NHSpecificTest/NH2318/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2318/Fixture.cs index b5f15a3194a..f9e9f032c9e 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2318/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2318/Fixture.cs @@ -13,7 +13,6 @@ public class Fixture : BugTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty("linqtohql.generatorsregistry", "NHibernate.Test.NHSpecificTest.NH2318.ExtendedLinqtoHqlGeneratorsRegistry, NHibernate.Test"); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2439/NH2439Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2439/NH2439Fixture.cs index 0d1a2b43f13..6de826d4dae 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2439/NH2439Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2439/NH2439Fixture.cs @@ -11,7 +11,6 @@ public class NH2439Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.ShowSql, "true"); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs index ac6114feb78..4e753234f00 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs @@ -14,7 +14,6 @@ protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) protected override void Configure(NHibernate.Cfg.Configuration configuration) { configuration.SetProperty(NHibernate.Cfg.Environment.Hbm2ddlKeyWords, "keywords"); - base.Configure(configuration); } protected override void OnSetUp() diff --git a/src/NHibernate.Test/NHSpecificTest/NH2583/AbstractMassTestingFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2583/AbstractMassTestingFixture.cs index 967cbf8e953..b5c7581f87f 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2583/AbstractMassTestingFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2583/AbstractMassTestingFixture.cs @@ -13,7 +13,6 @@ public abstract class AbstractMassTestingFixture : BugTestCase public const int BatchSize = 200; protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.DataBaseIntegration(x => x.BatchSize = BatchSize+5); List cacheSettings = new List(configuration.Properties.Keys.Where(x => x.Contains("cache"))); foreach (var cacheSetting in cacheSettings) diff --git a/src/NHibernate.Test/NHSpecificTest/NH2660And2661/Test.cs b/src/NHibernate.Test/NHSpecificTest/NH2660And2661/Test.cs index 19e7ae2a6d1..7918a27b16c 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2660And2661/Test.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2660And2661/Test.cs @@ -38,7 +38,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { // to be sure we are using the new drive - base.Configure(configuration); configuration.DataBaseIntegration(x=> x.Driver()); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs index 56d685c8047..a69396a8fa9 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs @@ -22,7 +22,7 @@ protected override void Configure(Cfg.Configuration configuration) { _originalDialect = Dialect; - cfg.SetProperty(Environment.Dialect, typeof(CustomDialect).AssemblyQualifiedName); + configuration.SetProperty(Environment.Dialect, typeof(CustomDialect).AssemblyQualifiedName); } public static string GetSql(ICriteria criteria) diff --git a/src/NHibernate.Test/NHSpecificTest/NH2869/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2869/Fixture.cs index 8280f1c3b8a..9ebc12e4f4e 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2869/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2869/Fixture.cs @@ -12,7 +12,6 @@ public class Fixture : BugTestCase protected override void Configure(Configuration configuration) { configuration.LinqToHqlGeneratorsRegistry(); - base.Configure(configuration); } protected override void OnSetUp() @@ -55,4 +54,4 @@ public void CustomExtensionWithConstantArgumentShouldBeIncludedInHqlProjection() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2898/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2898/Fixture.cs index cdff9247ad9..acf4c0fcd5f 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2898/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2898/Fixture.cs @@ -11,7 +11,6 @@ public class Fixture : BugTestCase { protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(BinaryFormatterCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } @@ -121,4 +120,4 @@ public void SecondLevelCacheWithHqlQueries() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH3058/SampleTest.cs b/src/NHibernate.Test/NHSpecificTest/NH3058/SampleTest.cs index 92e2994f147..1fd18d43f67 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3058/SampleTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3058/SampleTest.cs @@ -8,8 +8,6 @@ public class SampleTest : BugTestCase { protected override void Configure(Cfg.Configuration configuration) { - base.Configure(configuration); - configuration.Properties.Add("current_session_context_class", "thread_static"); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH3142/ChildrenTest.cs b/src/NHibernate.Test/NHSpecificTest/NH3142/ChildrenTest.cs index c9d982b2a4f..739cf8d5ec2 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3142/ChildrenTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3142/ChildrenTest.cs @@ -21,7 +21,6 @@ public ChildrenTest(BatchFetchStyle fetchStyle) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.BatchFetchStyle, _fetchStyle.ToString()); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH3202/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3202/Fixture.cs index 219ef8ad1bd..7bcc5f836a2 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3202/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3202/Fixture.cs @@ -16,11 +16,11 @@ protected override void Configure(Configuration configuration) if (!(Dialect is MsSql2008Dialect)) Assert.Ignore("Test is for MS SQL Server dialect only (custom dialect)."); - if (!typeof(SqlClientDriver).IsAssignableFrom(ReflectHelper.ClassForName(cfg.GetProperty(Environment.ConnectionDriver)))) + if (!typeof(SqlClientDriver).IsAssignableFrom(ReflectHelper.ClassForName(configuration.GetProperty(Environment.ConnectionDriver)))) Assert.Ignore("Test is for MS SQL Server driver only (custom driver is used)."); - cfg.SetProperty(Environment.Dialect, typeof(OffsetStartsAtOneTestDialect).AssemblyQualifiedName); - cfg.SetProperty(Environment.ConnectionDriver, typeof(OffsetTestDriver).AssemblyQualifiedName); + configuration.SetProperty(Environment.Dialect, typeof(OffsetStartsAtOneTestDialect).AssemblyQualifiedName); + configuration.SetProperty(Environment.ConnectionDriver, typeof(OffsetTestDriver).AssemblyQualifiedName); } private OffsetStartsAtOneTestDialect OffsetStartsAtOneTestDialect diff --git a/src/NHibernate.Test/NHSpecificTest/NH3426/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3426/Fixture.cs index 8da7a871fc1..ec5d6d8be27 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3426/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3426/Fixture.cs @@ -38,8 +38,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - if (Dialect is SQLiteDialect) { var connStr = configuration.Properties[Environment.ConnectionString]; diff --git a/src/NHibernate.Test/NHSpecificTest/NH3489/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3489/Fixture.cs index 3625746d047..8e61e97ceea 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3489/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3489/Fixture.cs @@ -61,7 +61,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.BatchSize, batchSize.ToString(CultureInfo.InvariantCulture)); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs index 45ca778c972..396a5ed3ba5 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs @@ -24,7 +24,6 @@ public BatchFetchStyleFixture(BatchFetchStyle fetchStyle) protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.BatchFetchStyle, _fetchStyle.ToString()); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH3848/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3848/Fixture.cs index f617a69752f..c8021a7d7f6 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3848/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3848/Fixture.cs @@ -76,7 +76,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Cache(c => { c.UseQueryCache = true; diff --git a/src/NHibernate.Test/NHSpecificTest/NH3912/ReusableBatcherFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3912/ReusableBatcherFixture.cs index 396fd38a48a..84007aa39a1 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3912/ReusableBatcherFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3912/ReusableBatcherFixture.cs @@ -36,7 +36,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Cfg.Environment.BatchStrategy, typeof(OracleDataClientBatchingBatcherFactory).AssemblyQualifiedName); } diff --git a/src/NHibernate.Test/NHSpecificTest/NH4077/PostInsertFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH4077/PostInsertFixture.cs index 9cb011fc9b0..ac1ea430c36 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH4077/PostInsertFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH4077/PostInsertFixture.cs @@ -61,7 +61,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); var existingListeners = (configuration.EventListeners.PostInsertEventListeners ?? Array.Empty()).ToList(); // this evil listener uses the session to perform a few queries and causes an auto-flush to happen existingListeners.Add(new CausesAutoflushListener()); diff --git a/src/NHibernate.Test/NHSpecificTest/NH4077/PostUpdateFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH4077/PostUpdateFixture.cs index ba2b9beb351..4a073046410 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH4077/PostUpdateFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH4077/PostUpdateFixture.cs @@ -55,7 +55,6 @@ protected override HbmMapping GetMappings() protected override void Configure(Configuration configuration) { - base.Configure(configuration); var existingListeners = (configuration.EventListeners.PostUpdateEventListeners ?? Array.Empty()).ToList(); // this evil listener uses the session to perform a few queries and causes an auto-flush to happen existingListeners.Add(new CausesAutoflushListener()); diff --git a/src/NHibernate.Test/Naturalid/Immutable/ImmutableNaturalIdFixture.cs b/src/NHibernate.Test/Naturalid/Immutable/ImmutableNaturalIdFixture.cs index 854867a5cc7..ff4a358ee3f 100644 --- a/src/NHibernate.Test/Naturalid/Immutable/ImmutableNaturalIdFixture.cs +++ b/src/NHibernate.Test/Naturalid/Immutable/ImmutableNaturalIdFixture.cs @@ -19,9 +19,9 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs b/src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs index 7149e89a67c..324db05247c 100644 --- a/src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs +++ b/src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs @@ -21,9 +21,9 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.UseSecondLevelCache, "true"); - cfg.SetProperty(Environment.UseQueryCache, "true"); - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.UseSecondLevelCache, "true"); + configuration.SetProperty(Environment.UseQueryCache, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Ondelete/JoinedSubclassFixture.cs b/src/NHibernate.Test/Ondelete/JoinedSubclassFixture.cs index 62c8a151e45..5469c9f12b4 100644 --- a/src/NHibernate.Test/Ondelete/JoinedSubclassFixture.cs +++ b/src/NHibernate.Test/Ondelete/JoinedSubclassFixture.cs @@ -19,9 +19,9 @@ protected override string[] Mappings get { return new string[] { "Ondelete.EFGJoinedSubclass.hbm.xml" }; } } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Ondelete/OnDeleteFixture.cs b/src/NHibernate.Test/Ondelete/OnDeleteFixture.cs index 1af405c0a14..5ea4f1c967b 100644 --- a/src/NHibernate.Test/Ondelete/OnDeleteFixture.cs +++ b/src/NHibernate.Test/Ondelete/OnDeleteFixture.cs @@ -19,7 +19,7 @@ protected override string[] Mappings protected override void Configure(Cfg.Configuration configuration) { - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) diff --git a/src/NHibernate.Test/Ondelete/ParentChildFixture.cs b/src/NHibernate.Test/Ondelete/ParentChildFixture.cs index d5303005de4..905de75dbe2 100644 --- a/src/NHibernate.Test/Ondelete/ParentChildFixture.cs +++ b/src/NHibernate.Test/Ondelete/ParentChildFixture.cs @@ -19,9 +19,9 @@ protected override string[] Mappings get { return new string[] { "Ondelete.ParentChild.hbm.xml" }; } } - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.GenerateStatistics, "true"); + configuration.SetProperty(Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/Pagination/CustomDialectFixture.cs b/src/NHibernate.Test/Pagination/CustomDialectFixture.cs index 3d0e571ae9a..bfba5aed930 100644 --- a/src/NHibernate.Test/Pagination/CustomDialectFixture.cs +++ b/src/NHibernate.Test/Pagination/CustomDialectFixture.cs @@ -30,12 +30,12 @@ protected override void Configure(Configuration configuration) // Configure is called before Applies, must check here. if (!(Dialect is MsSql2005Dialect)) Assert.Ignore("Test is for SQL dialect only"); - var driverClass = ReflectHelper.ClassForName(cfg.GetProperty(Environment.ConnectionDriver)); + var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Environment.ConnectionDriver)); if (!typeof(SqlClientDriver).IsAssignableFrom(driverClass)) Assert.Ignore("Test is compatible only with Sql Server Client driver connection strings"); - cfg.SetProperty(Environment.Dialect, typeof(CustomMsSqlDialect).AssemblyQualifiedName); - cfg.SetProperty(Environment.ConnectionDriver, typeof(CustomMsSqlDriver).AssemblyQualifiedName); + configuration.SetProperty(Environment.Dialect, typeof(CustomMsSqlDialect).AssemblyQualifiedName); + configuration.SetProperty(Environment.ConnectionDriver, typeof(CustomMsSqlDriver).AssemblyQualifiedName); } private CustomMsSqlDialect CustomDialect diff --git a/src/NHibernate.Test/Pagination/PaginationFixture.cs b/src/NHibernate.Test/Pagination/PaginationFixture.cs index df9f578bc45..b921dbeda42 100644 --- a/src/NHibernate.Test/Pagination/PaginationFixture.cs +++ b/src/NHibernate.Test/Pagination/PaginationFixture.cs @@ -23,7 +23,7 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - cfg.SetProperty(Environment.DefaultBatchFetchSize, "20"); + configuration.SetProperty(Environment.DefaultBatchFetchSize, "20"); } [Test] diff --git a/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs b/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs index acebb19a929..db2a020d380 100644 --- a/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs +++ b/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs @@ -29,8 +29,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.GenerateStatistics, "true"); } diff --git a/src/NHibernate.Test/ReadOnly/AbstractReadOnlyTest.cs b/src/NHibernate.Test/ReadOnly/AbstractReadOnlyTest.cs index 9957275d67a..f65135564b1 100644 --- a/src/NHibernate.Test/ReadOnly/AbstractReadOnlyTest.cs +++ b/src/NHibernate.Test/ReadOnly/AbstractReadOnlyTest.cs @@ -13,7 +13,6 @@ protected override string MappingsAssembly protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.GenerateStatistics, "true"); configuration.SetProperty(Environment.BatchSize, "0"); } diff --git a/src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs b/src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs index f8c8581363e..731a0674890 100644 --- a/src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs +++ b/src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs @@ -24,7 +24,6 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); configuration.Properties[Environment.CacheProvider] = typeof(HashtableCacheProvider).AssemblyQualifiedName; configuration.Properties[Environment.UseQueryCache] = "true"; } @@ -262,4 +261,4 @@ public void SecondLevelCacheWithHqlQueries() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs b/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs index 97dd424543b..c7b692d9a8f 100644 --- a/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs +++ b/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs @@ -13,7 +13,6 @@ protected override string MappingsAssembly protected override void Configure(NHibernate.Cfg.Configuration configuration) { - base.Configure(configuration); configuration.SetProperty(Environment.FormatSql, "false"); } diff --git a/src/NHibernate.Test/Stateless/StatelessSessionQueryFixture.cs b/src/NHibernate.Test/Stateless/StatelessSessionQueryFixture.cs index 90501423ffc..d28827c4a35 100644 --- a/src/NHibernate.Test/Stateless/StatelessSessionQueryFixture.cs +++ b/src/NHibernate.Test/Stateless/StatelessSessionQueryFixture.cs @@ -19,8 +19,7 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); - cfg.SetProperty(Environment.MaxFetchDepth, 1.ToString()); + configuration.SetProperty(Environment.MaxFetchDepth, 1.ToString()); } protected override bool AppliesTo(Dialect.Dialect dialect) diff --git a/src/NHibernate.Test/SubselectFetchTest/SubselectFetchFixture.cs b/src/NHibernate.Test/SubselectFetchTest/SubselectFetchFixture.cs index 3b60b3367a1..7d05eac7cd6 100644 --- a/src/NHibernate.Test/SubselectFetchTest/SubselectFetchFixture.cs +++ b/src/NHibernate.Test/SubselectFetchTest/SubselectFetchFixture.cs @@ -9,9 +9,9 @@ namespace NHibernate.Test.SubselectFetchTest [TestFixture] public class SubselectFetchFixture : TestCase { - protected override void Configure(Configuration cfg) + protected override void Configure(Configuration configuration) { - cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true"); + configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); } [Test] diff --git a/src/NHibernate.Test/TestCase.cs b/src/NHibernate.Test/TestCase.cs index 137818e1e90..1335b6a722a 100644 --- a/src/NHibernate.Test/TestCase.cs +++ b/src/NHibernate.Test/TestCase.cs @@ -293,10 +293,10 @@ protected void Configure() { cfg = TestConfigurationHelper.GetDefaultConfiguration(); - AddMappings(cfg); - Configure(cfg); + AddMappings(cfg); + ApplyCacheSettings(cfg); } diff --git a/src/NHibernate.Test/TypesTest/AbstractDateTimeTypeFixture.cs b/src/NHibernate.Test/TypesTest/AbstractDateTimeTypeFixture.cs index 0d95535b947..176c9954bf5 100644 --- a/src/NHibernate.Test/TypesTest/AbstractDateTimeTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/AbstractDateTimeTypeFixture.cs @@ -28,8 +28,6 @@ public abstract class AbstractDateTimeTypeFixture : TypeFixtureBase protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); ClientDriverWithParamsStats.DriverClass = driverClass; diff --git a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeFixture.cs b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeFixture.cs index d54f3876f33..013d98814af 100644 --- a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeFixture.cs @@ -28,7 +28,6 @@ protected override void Configure(Configuration configuration) ? (IType) NHibernateUtil.DateTimeNoMs : NHibernateUtil.DateTime; TypeFactory.RegisterType(typeof(DateTime), _testDefaultDateTimeType, TypeFactory.EmptyAliases); - base.Configure(configuration); } protected override void DropSchema() diff --git a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithLengthFixture.cs b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithLengthFixture.cs index e8fbd52f2db..3f9ecc0b2c6 100644 --- a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithLengthFixture.cs +++ b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithLengthFixture.cs @@ -46,7 +46,6 @@ protected override void Configure(Configuration configuration) _testDefaultStringType, new[] {"string"}, length => new CustomStringType(length)); - base.Configure(configuration); } protected override void DropSchema() diff --git a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithPrecisionFixture.cs b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithPrecisionFixture.cs index 2d803f5b4e5..fd71f8da3da 100644 --- a/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithPrecisionFixture.cs +++ b/src/NHibernate.Test/TypesTest/ChangeDefaultTypeWithPrecisionFixture.cs @@ -47,7 +47,6 @@ protected override void Configure(Configuration configuration) _testDefaultType, new[] {"currency"}, (precision, scale) => new CustomCurrencyType(precision, scale)); - base.Configure(configuration); } protected override void DropSchema() diff --git a/src/NHibernate.Test/TypesTest/DateTimeOffsetTypeFixture.cs b/src/NHibernate.Test/TypesTest/DateTimeOffsetTypeFixture.cs index b38475b3a40..61a2bd59029 100644 --- a/src/NHibernate.Test/TypesTest/DateTimeOffsetTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/DateTimeOffsetTypeFixture.cs @@ -30,8 +30,6 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory) => protected override void Configure(Configuration configuration) { - base.Configure(configuration); - var driverClass = ReflectHelper.ClassForName(configuration.GetProperty(Cfg.Environment.ConnectionDriver)); ClientDriverWithParamsStats.DriverClass = driverClass; diff --git a/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs b/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs index 4f839a39df8..7a907c84267 100644 --- a/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs @@ -24,8 +24,6 @@ protected override bool AppliesTo(Dialect.Dialect dialect) protected override void Configure(Configuration configuration) { - base.Configure(configuration); - if (Dialect is FirebirdDialect) { configuration.SetProperty(Environment.QueryDefaultCastPrecision, "18"); diff --git a/src/NHibernate.Test/Unionsubclass/DatabaseKeywordsFixture.cs b/src/NHibernate.Test/Unionsubclass/DatabaseKeywordsFixture.cs index 8f76ead9605..09e91e2483d 100644 --- a/src/NHibernate.Test/Unionsubclass/DatabaseKeywordsFixture.cs +++ b/src/NHibernate.Test/Unionsubclass/DatabaseKeywordsFixture.cs @@ -19,8 +19,6 @@ protected override string[] Mappings protected override void Configure(Configuration configuration) { - base.Configure(configuration); - configuration.SetProperty(Environment.Hbm2ddlKeyWords, "auto-quote"); }