mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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.
This commit is contained in:
@@ -37,6 +37,10 @@ using log4net;
|
||||
using System.Reflection;
|
||||
using System.Data.Common;
|
||||
|
||||
#if !NUNIT25
|
||||
using NUnit.Framework.SyntaxHelpers;
|
||||
#endif
|
||||
|
||||
|
||||
// DBMS-specific:
|
||||
using MySql.Data.MySqlClient;
|
||||
@@ -51,10 +55,32 @@ using OpenSim.Data.SQLite;
|
||||
|
||||
namespace OpenSim.Data.Tests
|
||||
{
|
||||
|
||||
#if NUNIT25
|
||||
|
||||
[TestFixture(typeof(MySqlConnection), typeof(MySQLEstateStore), Description = "Estate store tests (MySQL)")]
|
||||
[TestFixture(typeof(SqlConnection), typeof(MSSQLEstateStore), Description = "Estate store tests (MS SQL Server)")]
|
||||
[TestFixture(typeof(SqliteConnection), typeof(SQLiteEstateStore), Description = "Estate store tests (SQLite)")]
|
||||
|
||||
#else
|
||||
|
||||
[TestFixture(Description = "Estate store tests (SQLite)")]
|
||||
public class SQLiteEstateTests : EstateTests<SqliteConnection, SQLiteEstateStore>
|
||||
{
|
||||
}
|
||||
|
||||
[TestFixture(Description = "Estate store tests (MySQL)")]
|
||||
public class MySqlEstateTests : EstateTests<MySqlConnection, MySQLEstateStore>
|
||||
{
|
||||
}
|
||||
|
||||
[TestFixture(Description = "Estate store tests (MS SQL Server)")]
|
||||
public class MSSQLEstateTests : EstateTests<SqlConnection, MSSQLEstateStore>
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore>
|
||||
where TConn : DbConnection, new()
|
||||
where TEstateStore : class, IEstateDataStore, new()
|
||||
|
||||
Reference in New Issue
Block a user