diff options
Diffstat (limited to 'OpenSim/Data/Tests/InventoryTests.cs')
-rw-r--r-- | OpenSim/Data/Tests/InventoryTests.cs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs index d5f3be4..93e1eba 100644 --- a/OpenSim/Data/Tests/InventoryTests.cs +++ b/OpenSim/Data/Tests/InventoryTests.cs | |||
@@ -25,6 +25,8 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | // #define NUNIT25 | ||
29 | |||
28 | using System; | 30 | using System; |
29 | using log4net.Config; | 31 | using log4net.Config; |
30 | using NUnit.Framework; | 32 | using NUnit.Framework; |
@@ -35,6 +37,10 @@ using log4net; | |||
35 | using System.Reflection; | 37 | using System.Reflection; |
36 | using System.Data.Common; | 38 | using System.Data.Common; |
37 | 39 | ||
40 | #if !NUNIT25 | ||
41 | using NUnit.Framework.SyntaxHelpers; | ||
42 | #endif | ||
43 | |||
38 | // DBMS-specific: | 44 | // DBMS-specific: |
39 | using MySql.Data.MySqlClient; | 45 | using MySql.Data.MySqlClient; |
40 | using OpenSim.Data.MySQL; | 46 | using OpenSim.Data.MySQL; |
@@ -47,9 +53,29 @@ using OpenSim.Data.SQLite; | |||
47 | 53 | ||
48 | namespace OpenSim.Data.Tests | 54 | namespace OpenSim.Data.Tests |
49 | { | 55 | { |
56 | #if NUNIT25 | ||
57 | |||
58 | [TestFixture(typeof(SqliteConnection), typeof(SQLiteInventoryStore), Description = "Inventory store tests (SQLite)")] | ||
50 | [TestFixture(typeof(MySqlConnection), typeof(MySQLInventoryData), Description = "Inventory store tests (MySQL)")] | 59 | [TestFixture(typeof(MySqlConnection), typeof(MySQLInventoryData), Description = "Inventory store tests (MySQL)")] |
51 | [TestFixture(typeof(SqlConnection), typeof(MSSQLInventoryData), Description = "Inventory store tests (MS SQL Server)")] | 60 | [TestFixture(typeof(SqlConnection), typeof(MSSQLInventoryData), Description = "Inventory store tests (MS SQL Server)")] |
52 | [TestFixture(typeof(SqliteConnection), typeof(SQLiteInventoryStore), Description = "Inventory store tests (SQLite)")] | 61 | |
62 | #else | ||
63 | |||
64 | [TestFixture(Description = "Inventory store tests (SQLite)")] | ||
65 | public class SQLiteInventoryTests : InventoryTests<SqliteConnection, SQLiteInventoryStore> | ||
66 | { | ||
67 | } | ||
68 | |||
69 | [TestFixture(Description = "Inventory store tests (MySQL)")] | ||
70 | public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData> | ||
71 | { | ||
72 | } | ||
73 | |||
74 | [TestFixture(Description = "Inventory store tests (MS SQL Server)")] | ||
75 | public class MSSQLInventoryTests : InventoryTests<SqlConnection, MSSQLInventoryData> | ||
76 | { | ||
77 | } | ||
78 | #endif | ||
53 | 79 | ||
54 | public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore> | 80 | public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore> |
55 | where TConn : DbConnection, new() | 81 | where TConn : DbConnection, new() |
@@ -85,6 +111,7 @@ namespace OpenSim.Data.Tests | |||
85 | { | 111 | { |
86 | name1 = "Root Folder for " + owner1.ToString(); | 112 | name1 = "Root Folder for " + owner1.ToString(); |
87 | } | 113 | } |
114 | public InventoryTests() : this("") { } | ||
88 | 115 | ||
89 | protected override void InitService(object service) | 116 | protected override void InitService(object service) |
90 | { | 117 | { |