aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs38
-rw-r--r--prebuild.xml1
2 files changed, 13 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}
diff --git a/prebuild.xml b/prebuild.xml
index eff16ad..a935731 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -3335,6 +3335,7 @@
3335 <Reference name="OpenSim.Data"/> 3335 <Reference name="OpenSim.Data"/>
3336 <Reference name="OpenSim.Region.Framework"/> 3336 <Reference name="OpenSim.Region.Framework"/>
3337 <Reference name="OpenSim.Region.CoreModules"/> 3337 <Reference name="OpenSim.Region.CoreModules"/>
3338 <Reference name="OpenSim.Tests.Common"/>
3338 <Reference name="log4net.dll"/> 3339 <Reference name="log4net.dll"/>
3339 <Reference name="Mono.Addins.dll" /> 3340 <Reference name="Mono.Addins.dll" />
3340 <Reference name="nunit.framework.dll" /> 3341 <Reference name="nunit.framework.dll" />