aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/AssetTests.cs
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Data/Tests/AssetTests.cs
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Data/Tests/AssetTests.cs')
-rw-r--r--OpenSim/Data/Tests/AssetTests.cs24
1 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs
index 8cb2ee0..5d7b169 100644
--- a/OpenSim/Data/Tests/AssetTests.cs
+++ b/OpenSim/Data/Tests/AssetTests.cs
@@ -40,9 +40,6 @@ using log4net;
40using MySql.Data.MySqlClient; 40using MySql.Data.MySqlClient;
41using OpenSim.Data.MySQL; 41using OpenSim.Data.MySQL;
42 42
43using System.Data.SqlClient;
44using OpenSim.Data.MSSQL;
45
46using Mono.Data.Sqlite; 43using Mono.Data.Sqlite;
47using OpenSim.Data.SQLite; 44using OpenSim.Data.SQLite;
48 45
@@ -58,11 +55,6 @@ namespace OpenSim.Data.Tests
58 { 55 {
59 } 56 }
60 57
61 [TestFixture(Description = "Asset store tests (MS SQL Server)")]
62 public class MSSQLAssetTests : AssetTests<SqlConnection, MSSQLAssetData>
63 {
64 }
65
66 public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData> 58 public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData>
67 where TConn : DbConnection, new() 59 where TConn : DbConnection, new()
68 where TAssetData : AssetDataBase, new() 60 where TAssetData : AssetDataBase, new()
@@ -107,10 +99,11 @@ namespace OpenSim.Data.Tests
107 public void T001_LoadEmpty() 99 public void T001_LoadEmpty()
108 { 100 {
109 TestHelpers.InMethod(); 101 TestHelpers.InMethod();
110 102
111 Assert.That(m_db.ExistsAsset(uuid1), Is.False); 103 bool[] exist = m_db.AssetsExist(new[] { uuid1, uuid2, uuid3 });
112 Assert.That(m_db.ExistsAsset(uuid2), Is.False); 104 Assert.IsFalse(exist[0]);
113 Assert.That(m_db.ExistsAsset(uuid3), Is.False); 105 Assert.IsFalse(exist[1]);
106 Assert.IsFalse(exist[2]);
114 } 107 }
115 108
116 [Test] 109 [Test]
@@ -159,9 +152,10 @@ namespace OpenSim.Data.Tests
159 AssetBase a3b = m_db.GetAsset(uuid3); 152 AssetBase a3b = m_db.GetAsset(uuid3);
160 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a)); 153 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a));
161 154
162 Assert.That(m_db.ExistsAsset(uuid1), Is.True); 155 bool[] exist = m_db.AssetsExist(new[] { uuid1, uuid2, uuid3 });
163 Assert.That(m_db.ExistsAsset(uuid2), Is.True); 156 Assert.IsTrue(exist[0]);
164 Assert.That(m_db.ExistsAsset(uuid3), Is.True); 157 Assert.IsTrue(exist[1]);
158 Assert.IsTrue(exist[2]);
165 159
166 List<AssetMetadata> metadatas = m_db.FetchAssetMetadataSet(0, 1000); 160 List<AssetMetadata> metadatas = m_db.FetchAssetMetadataSet(0, 1000);
167 161