aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/EstateTests.cs
diff options
context:
space:
mode:
authorAlexRa2010-05-21 15:59:26 +0300
committerAlexRa2010-05-23 11:48:10 +0300
commit2537acc04db736cdc885e23bbfaade690d56fa5f (patch)
tree7078384e80246b6e55191782194bfa7c17ab63a5 /OpenSim/Data/Tests/EstateTests.cs
parentAdded MS SQL test conn to INI - only as an example, modify before use!!! (diff)
downloadopensim-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.cs26
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;
37using System.Reflection; 37using System.Reflection;
38using System.Data.Common; 38using System.Data.Common;
39 39
40#if !NUNIT25
41using NUnit.Framework.SyntaxHelpers;
42#endif
43
40 44
41// DBMS-specific: 45// DBMS-specific:
42using MySql.Data.MySqlClient; 46using MySql.Data.MySqlClient;
@@ -51,10 +55,32 @@ using OpenSim.Data.SQLite;
51 55
52namespace OpenSim.Data.Tests 56namespace 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()