aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-22 02:16:46 +0100
committerJustin Clark-Casey (justincc)2011-10-22 02:16:46 +0100
commitffdf59a57c936189e3b161b79b4a76a3a9b260bb (patch)
treec857a6214e291e5b91f1241107b84baa3b9f246f /OpenSim/Region/Framework/Scenes/Tests
parentredirect UserInventoryHelpers to use a different CreateNotecardAsset() so we ... (diff)
downloadopensim-SC_OLD-ffdf59a57c936189e3b161b79b4a76a3a9b260bb.zip
opensim-SC_OLD-ffdf59a57c936189e3b161b79b4a76a3a9b260bb.tar.gz
opensim-SC_OLD-ffdf59a57c936189e3b161b79b4a76a3a9b260bb.tar.bz2
opensim-SC_OLD-ffdf59a57c936189e3b161b79b4a76a3a9b260bb.tar.xz
Get UUIDGatherer to scan notecards in the graph for asset uuids.
This is to support npc baked texture saving in oars and iars. May address http://opensimulator.org/mantis/view.php?id=5743
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index 24de56e..d9fe87c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -85,5 +85,31 @@ namespace OpenSim.Region.Framework.Scenes.Tests
85 // We count the uuid as gathered even if the asset itself is missing. 85 // We count the uuid as gathered even if the asset itself is missing.
86 Assert.That(foundAssetUuids.Count, Is.EqualTo(1)); 86 Assert.That(foundAssetUuids.Count, Is.EqualTo(1));
87 } 87 }
88
89 [Test]
90 public void TestNotecardAsset()
91 {
92 TestHelpers.InMethod();
93// log4net.Config.XmlConfigurator.Configure();
94
95 UUID ownerId = TestHelpers.ParseTail(0x10);
96 UUID soAssetId = TestHelpers.ParseTail(0x20);
97 UUID ncAssetId = TestHelpers.ParseTail(0x30);
98
99 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, ownerId);
100 AssetBase soAsset = AssetHelpers.CreateAsset(soAssetId, so);
101 m_assetService.Store(soAsset);
102
103 AssetBase ncAsset = AssetHelpers.CreateNotecardAsset(ncAssetId, soAssetId.ToString());
104 m_assetService.Store(ncAsset);
105
106 IDictionary<UUID, AssetType> foundAssetUuids = new Dictionary<UUID, AssetType>();
107 m_uuidGatherer.GatherAssetUuids(ncAssetId, AssetType.Notecard, foundAssetUuids);
108
109 // We count the uuid as gathered even if the asset itself is corrupt.
110 Assert.That(foundAssetUuids.Count, Is.EqualTo(2));
111 Assert.That(foundAssetUuids.ContainsKey(ncAssetId));
112 Assert.That(foundAssetUuids.ContainsKey(soAssetId));
113 }
88 } 114 }
89} 115}