aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorKunnis2009-08-15 23:43:52 -0500
committerTeravus Ovares (Dan Olivares)2009-08-16 14:26:43 -0400
commit5dde4a4cfae106805b480ae4e22e2f6c79ef3fa5 (patch)
tree052ef4f87f8352a41d01097d2a0395c5b971af4f /OpenSim
parent* Fixed MySQL/MySQLAssetData.cs to properly do updates * Removed an extra par... (diff)
downloadopensim-SC_OLD-5dde4a4cfae106805b480ae4e22e2f6c79ef3fa5.zip
opensim-SC_OLD-5dde4a4cfae106805b480ae4e22e2f6c79ef3fa5.tar.gz
opensim-SC_OLD-5dde4a4cfae106805b480ae4e22e2f6c79ef3fa5.tar.bz2
opensim-SC_OLD-5dde4a4cfae106805b480ae4e22e2f6c79ef3fa5.tar.xz
* More improvements to BasicAssetTest.cs
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs38
1 files changed, 12 insertions, 26 deletions
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs
index 91b613a..23041ad 100644
--- a/OpenSim/Data/Tests/BasicAssetTest.cs
+++ b/OpenSim/Data/Tests/BasicAssetTest.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using log4net.Config; 30using log4net.Config;
30using NUnit.Framework; 31using NUnit.Framework;
31using NUnit.Framework.SyntaxHelpers; 32using NUnit.Framework.SyntaxHelpers;
@@ -37,8 +38,7 @@ namespace OpenSim.Data.Tests
37{ 38{
38 public class BasicAssetTest 39 public class BasicAssetTest
39 { 40 {
40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41 public IAssetDataPlugin db;
41 public AssetDataBase db;
42 public UUID uuid1; 42 public UUID uuid1;
43 public UUID uuid2; 43 public UUID uuid2;
44 public UUID uuid3; 44 public UUID uuid3;
@@ -46,14 +46,7 @@ namespace OpenSim.Data.Tests
46 46
47 public void SuperInit() 47 public void SuperInit()
48 { 48 {
49 try 49 OpenSim.Tests.Common.TestLogging.LogToConsole();
50 {
51 XmlConfigurator.Configure();
52 }
53 catch (Exception)
54 {
55 // I don't care, just leave log4net off
56 }
57 50
58 uuid1 = UUID.Random(); 51 uuid1 = UUID.Random();
59 uuid2 = UUID.Random(); 52 uuid2 = UUID.Random();
@@ -126,26 +119,19 @@ namespace OpenSim.Data.Tests
126 119
127 AssetBase a3b = db.FetchAsset(uuid3); 120 AssetBase a3b = db.FetchAsset(uuid3);
128 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a)); 121 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a));
129 }
130 122
131 [Test]
132 public void T011_ExistsSimpleAsset()
133 {
134 Assert.That(db.ExistsAsset(uuid1), Is.True); 123 Assert.That(db.ExistsAsset(uuid1), Is.True);
135 Assert.That(db.ExistsAsset(uuid2), Is.True); 124 Assert.That(db.ExistsAsset(uuid2), Is.True);
136 Assert.That(db.ExistsAsset(uuid3), Is.True); 125 Assert.That(db.ExistsAsset(uuid3), Is.True);
137 }
138 126
139 // this has questionable use, but it is in the interface at the moment. 127 List<AssetMetadata> metadatas = db.FetchAssetMetadataSet(0, 1000);
140 // [Test] 128
141 // public void T012_DeleteAsset() 129 AssetMetadata metadata = metadatas.Find(x => x.FullID == uuid1);
142 // { 130 Assert.That(metadata.Name, Is.EqualTo(a1b.Name));
143 // db.DeleteAsset(uuid1); 131 Assert.That(metadata.Description, Is.EqualTo(a1b.Description));
144 // db.DeleteAsset(uuid2); 132 Assert.That(metadata.Type, Is.EqualTo(a1b.Type));
145 // db.DeleteAsset(uuid3); 133 Assert.That(metadata.Temporary, Is.EqualTo(a1b.Temporary));
146 // Assert.That(db.ExistsAsset(uuid1), Is.False); 134 Assert.That(metadata.FullID, Is.EqualTo(a1b.FullID));
147 // Assert.That(db.ExistsAsset(uuid2), Is.False); 135 }
148 // Assert.That(db.ExistsAsset(uuid3), Is.False);
149 // }
150 } 136 }
151} 137}