diff options
Diffstat (limited to 'OpenSim/Data/Tests/AssetTests.cs')
-rw-r--r-- | OpenSim/Data/Tests/AssetTests.cs | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs index 800b9bf..b5ae244 100644 --- a/OpenSim/Data/Tests/AssetTests.cs +++ b/OpenSim/Data/Tests/AssetTests.cs | |||
@@ -32,13 +32,10 @@ using NUnit.Framework; | |||
32 | using NUnit.Framework.Constraints; | 32 | using NUnit.Framework.Constraints; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Tests.Common; | ||
35 | using System.Data.Common; | 36 | using System.Data.Common; |
36 | using log4net; | 37 | using log4net; |
37 | 38 | ||
38 | #if !NUNIT25 | ||
39 | using NUnit.Framework.SyntaxHelpers; | ||
40 | #endif | ||
41 | |||
42 | // DBMS-specific: | 39 | // DBMS-specific: |
43 | using MySql.Data.MySqlClient; | 40 | using MySql.Data.MySqlClient; |
44 | using OpenSim.Data.MySQL; | 41 | using OpenSim.Data.MySQL; |
@@ -51,15 +48,6 @@ using OpenSim.Data.SQLite; | |||
51 | 48 | ||
52 | namespace OpenSim.Data.Tests | 49 | namespace OpenSim.Data.Tests |
53 | { | 50 | { |
54 | |||
55 | #if NUNIT25 | ||
56 | |||
57 | [TestFixture(typeof(MySqlConnection), typeof(MySQLAssetData), Description="Basic Asset store tests (MySQL)")] | ||
58 | [TestFixture(typeof(SqlConnection), typeof(MSSQLAssetData), Description = "Basic Asset store tests (MS SQL Server)")] | ||
59 | [TestFixture(typeof(SqliteConnection), typeof(SQLiteAssetData), Description = "Basic Asset store tests (SQLite)")] | ||
60 | |||
61 | #else | ||
62 | |||
63 | [TestFixture(Description = "Asset store tests (SQLite)")] | 51 | [TestFixture(Description = "Asset store tests (SQLite)")] |
64 | public class SQLiteAssetTests : AssetTests<SqliteConnection, SQLiteAssetData> | 52 | public class SQLiteAssetTests : AssetTests<SqliteConnection, SQLiteAssetData> |
65 | { | 53 | { |
@@ -75,9 +63,6 @@ namespace OpenSim.Data.Tests | |||
75 | { | 63 | { |
76 | } | 64 | } |
77 | 65 | ||
78 | #endif | ||
79 | |||
80 | |||
81 | public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData> | 66 | public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData> |
82 | where TConn : DbConnection, new() | 67 | where TConn : DbConnection, new() |
83 | where TAssetData : AssetDataBase, new() | 68 | where TAssetData : AssetDataBase, new() |
@@ -121,6 +106,8 @@ namespace OpenSim.Data.Tests | |||
121 | [Test] | 106 | [Test] |
122 | public void T001_LoadEmpty() | 107 | public void T001_LoadEmpty() |
123 | { | 108 | { |
109 | TestHelper.InMethod(); | ||
110 | |||
124 | Assert.That(m_db.ExistsAsset(uuid1), Is.False); | 111 | Assert.That(m_db.ExistsAsset(uuid1), Is.False); |
125 | Assert.That(m_db.ExistsAsset(uuid2), Is.False); | 112 | Assert.That(m_db.ExistsAsset(uuid2), Is.False); |
126 | Assert.That(m_db.ExistsAsset(uuid3), Is.False); | 113 | Assert.That(m_db.ExistsAsset(uuid3), Is.False); |
@@ -129,6 +116,8 @@ namespace OpenSim.Data.Tests | |||
129 | [Test] | 116 | [Test] |
130 | public void T010_StoreReadVerifyAssets() | 117 | public void T010_StoreReadVerifyAssets() |
131 | { | 118 | { |
119 | TestHelper.InMethod(); | ||
120 | |||
132 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString()); | 121 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString()); |
133 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString()); | 122 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString()); |
134 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString()); | 123 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString()); |
@@ -194,6 +183,8 @@ namespace OpenSim.Data.Tests | |||
194 | [Test] | 183 | [Test] |
195 | public void T020_CheckForWeirdCreatorID() | 184 | public void T020_CheckForWeirdCreatorID() |
196 | { | 185 | { |
186 | TestHelper.InMethod(); | ||
187 | |||
197 | // It is expected that eventually the CreatorID might be an arbitrary string (an URI) | 188 | // It is expected that eventually the CreatorID might be an arbitrary string (an URI) |
198 | // rather than a valid UUID (?). This test is to make sure that the database layer does not | 189 | // rather than a valid UUID (?). This test is to make sure that the database layer does not |
199 | // attempt to convert CreatorID to GUID, but just passes it both ways as a string. | 190 | // attempt to convert CreatorID to GUID, but just passes it both ways as a string. |
@@ -218,4 +209,4 @@ namespace OpenSim.Data.Tests | |||
218 | Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); | 209 | Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); |
219 | } | 210 | } |
220 | } | 211 | } |
221 | } | 212 | } \ No newline at end of file |