aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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}