aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/RegionTests.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/RegionTests.cs
parentAdded MS SQL test conn to INI - only as an example, modify before use!!! (diff)
downloadopensim-SC_OLD-2537acc04db736cdc885e23bbfaade690d56fa5f.zip
opensim-SC_OLD-2537acc04db736cdc885e23bbfaade690d56fa5f.tar.gz
opensim-SC_OLD-2537acc04db736cdc885e23bbfaade690d56fa5f.tar.bz2
opensim-SC_OLD-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/RegionTests.cs')
-rw-r--r--OpenSim/Data/Tests/RegionTests.cs27
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs
index f38dc4a..5ac2dd0 100644
--- a/OpenSim/Data/Tests/RegionTests.cs
+++ b/OpenSim/Data/Tests/RegionTests.cs
@@ -40,6 +40,10 @@ using log4net;
40using System.Reflection; 40using System.Reflection;
41using System.Data.Common; 41using System.Data.Common;
42 42
43#if !NUNIT25
44using NUnit.Framework.SyntaxHelpers;
45#endif
46
43// DBMS-specific: 47// DBMS-specific:
44using MySql.Data.MySqlClient; 48using MySql.Data.MySqlClient;
45using OpenSim.Data.MySQL; 49using OpenSim.Data.MySQL;
@@ -52,9 +56,30 @@ using OpenSim.Data.SQLite;
52 56
53namespace OpenSim.Data.Tests 57namespace OpenSim.Data.Tests
54{ 58{
59#if NUNIT25
60
61 [TestFixture(typeof(SqliteConnection), typeof(SQLiteRegionData), Description = "Region store tests (SQLite)")]
55 [TestFixture(typeof(MySqlConnection), typeof(MySqlRegionData), Description = "Region store tests (MySQL)")] 62 [TestFixture(typeof(MySqlConnection), typeof(MySqlRegionData), Description = "Region store tests (MySQL)")]
56 [TestFixture(typeof(SqlConnection), typeof(MSSQLRegionData), Description = "Region store tests (MS SQL Server)")] 63 [TestFixture(typeof(SqlConnection), typeof(MSSQLRegionData), Description = "Region store tests (MS SQL Server)")]
57 [TestFixture(typeof(SqliteConnection), typeof(SQLiteRegionData), Description = "Region store tests (SQLite)")] 64
65#else
66
67 [TestFixture(Description = "Region store tests (SQLite)")]
68 public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteRegionData>
69 {
70 }
71
72 [TestFixture(Description = "Region store tests (MySQL)")]
73 public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLDataStore>
74 {
75 }
76
77 [TestFixture(Description = "Region store tests (MS SQL Server)")]
78 public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLRegionDataStore>
79 {
80 }
81
82#endif
58 83
59 public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore> 84 public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore>
60 where TConn : DbConnection, new() 85 where TConn : DbConnection, new()