diff options
author | AlexRa | 2010-05-21 15:59:26 +0300 |
---|---|---|
committer | AlexRa | 2010-05-23 11:48:10 +0300 |
commit | 2537acc04db736cdc885e23bbfaade690d56fa5f (patch) | |
tree | 7078384e80246b6e55191782194bfa7c17ab63a5 /OpenSim/Data/Tests/EstateTests.cs | |
parent | Added MS SQL test conn to INI - only as an example, modify before use!!! (diff) | |
download | opensim-SC-2537acc04db736cdc885e23bbfaade690d56fa5f.zip opensim-SC-2537acc04db736cdc885e23bbfaade690d56fa5f.tar.gz opensim-SC-2537acc04db736cdc885e23bbfaade690d56fa5f.tar.bz2 opensim-SC-2537acc04db736cdc885e23bbfaade690d56fa5f.tar.xz |
Unitests: Asset, Estate, Region (the "legacy" one), Inventory
The tests have been modified to work under NUnit 2.4.6
(the one currently used in the project).
They will also work with NUnit 2.5+ as is, but will look better
if you #define NUNIT25 for them.
Diffstat (limited to 'OpenSim/Data/Tests/EstateTests.cs')
-rw-r--r-- | OpenSim/Data/Tests/EstateTests.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs index 4893cc7..2da010d 100644 --- a/OpenSim/Data/Tests/EstateTests.cs +++ b/OpenSim/Data/Tests/EstateTests.cs | |||
@@ -37,6 +37,10 @@ using log4net; | |||
37 | using System.Reflection; | 37 | using System.Reflection; |
38 | using System.Data.Common; | 38 | using System.Data.Common; |
39 | 39 | ||
40 | #if !NUNIT25 | ||
41 | using NUnit.Framework.SyntaxHelpers; | ||
42 | #endif | ||
43 | |||
40 | 44 | ||
41 | // DBMS-specific: | 45 | // DBMS-specific: |
42 | using MySql.Data.MySqlClient; | 46 | using MySql.Data.MySqlClient; |
@@ -51,10 +55,32 @@ using OpenSim.Data.SQLite; | |||
51 | 55 | ||
52 | namespace OpenSim.Data.Tests | 56 | namespace OpenSim.Data.Tests |
53 | { | 57 | { |
58 | |||
59 | #if NUNIT25 | ||
60 | |||
54 | [TestFixture(typeof(MySqlConnection), typeof(MySQLEstateStore), Description = "Estate store tests (MySQL)")] | 61 | [TestFixture(typeof(MySqlConnection), typeof(MySQLEstateStore), Description = "Estate store tests (MySQL)")] |
55 | [TestFixture(typeof(SqlConnection), typeof(MSSQLEstateStore), Description = "Estate store tests (MS SQL Server)")] | 62 | [TestFixture(typeof(SqlConnection), typeof(MSSQLEstateStore), Description = "Estate store tests (MS SQL Server)")] |
56 | [TestFixture(typeof(SqliteConnection), typeof(SQLiteEstateStore), Description = "Estate store tests (SQLite)")] | 63 | [TestFixture(typeof(SqliteConnection), typeof(SQLiteEstateStore), Description = "Estate store tests (SQLite)")] |
57 | 64 | ||
65 | #else | ||
66 | |||
67 | [TestFixture(Description = "Estate store tests (SQLite)")] | ||
68 | public class SQLiteEstateTests : EstateTests<SqliteConnection, SQLiteEstateStore> | ||
69 | { | ||
70 | } | ||
71 | |||
72 | [TestFixture(Description = "Estate store tests (MySQL)")] | ||
73 | public class MySqlEstateTests : EstateTests<MySqlConnection, MySQLEstateStore> | ||
74 | { | ||
75 | } | ||
76 | |||
77 | [TestFixture(Description = "Estate store tests (MS SQL Server)")] | ||
78 | public class MSSQLEstateTests : EstateTests<SqlConnection, MSSQLEstateStore> | ||
79 | { | ||
80 | } | ||
81 | |||
82 | #endif | ||
83 | |||
58 | public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore> | 84 | public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore> |
59 | where TConn : DbConnection, new() | 85 | where TConn : DbConnection, new() |
60 | where TEstateStore : class, IEstateDataStore, new() | 86 | where TEstateStore : class, IEstateDataStore, new() |