-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert previous changes to Core components.
Fix "duplicate key" bug. Column name may differ (case only) from provided primaryKeyName. Avoid statement caching when using Oracle provider. Escape Oracle stored procedure parameter names. Cleanup ParametersHelper gutter, no logic changes.
- 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.