-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Revert previous changes to Core components.""
This reverts commit d03730c5168c3d399416ea16f260be257d137c56.
- Loading branch information
Showing
26 changed files
with
754 additions
and
184 deletions.
There are no files selected for viewing
42 changes: 37 additions & 5 deletions
42
PetaPoco.Tests.Integration/Databases/OracleTests/OracleDatabaseTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,46 @@ | ||
using PetaPoco.Tests.Integration.Providers; | ||
using System.Reflection; | ||
using PetaPoco.Tests.Integration.Providers; | ||
using Xunit; | ||
|
||
namespace PetaPoco.Tests.Integration.Databases.Oracle | ||
{ | ||
[Collection("Oracle")] | ||
public class OracleDatabaseTests : DatabaseTests | ||
public abstract partial class OracleDatabaseTests : DatabaseTests | ||
{ | ||
public OracleDatabaseTests() | ||
: base(new OracleTestProvider()) | ||
protected OracleDatabaseTests(TestProvider provider) | ||
: base(provider) | ||
{ | ||
} | ||
|
||
[Collection("Oracle.Delimited")] | ||
public class Delimited : OracleDatabaseTests | ||
{ | ||
public Delimited() | ||
: base(new OracleDelimitedTestProvider()) | ||
{ | ||
} | ||
} | ||
|
||
[Collection("Oracle.Ordinary")] | ||
public class Ordinary : OracleDatabaseTests | ||
{ | ||
public Ordinary() | ||
: base(new OracleOrdinaryTestProvider()) | ||
{ | ||
} | ||
|
||
/// <remarks> | ||
/// We need to retain the custom provider and default mapper specified in the test provider | ||
/// to ensure correct logic is applied. | ||
/// </remarks> | ||
protected override void AfterDbCreate(Database db) | ||
{ | ||
base.AfterDbCreate(db); | ||
|
||
// ReSharper disable once PossibleNullReferenceException | ||
db.GetType().GetField("_provider", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(db, DB.Provider); | ||
// ReSharper disable once PossibleNullReferenceException | ||
db.GetType().GetField("_defaultMapper", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(db, DB.DefaultMapper); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.