diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs index 0b41039..937c414 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |||
@@ -122,40 +122,37 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
122 | } | 122 | } |
123 | 123 | ||
124 | [Test] | 124 | [Test] |
125 | public void TestTaskItem() | 125 | public void TestTaskItems() |
126 | { | 126 | { |
127 | TestHelpers.InMethod(); | 127 | TestHelpers.InMethod(); |
128 | TestHelpers.EnableLogging(); | 128 | // TestHelpers.EnableLogging(); |
129 | 129 | ||
130 | UUID ownerId = TestHelpers.ParseTail(0x10); | 130 | UUID ownerId = TestHelpers.ParseTail(0x10); |
131 | UUID embeddedId = TestHelpers.ParseTail(0x20); | ||
132 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); | ||
133 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); | ||
134 | UUID ncAssetId = TestHelpers.ParseTail(0x30); | ||
135 | 131 | ||
136 | AssetBase ncAsset | 132 | SceneObjectGroup soL0 = SceneHelpers.CreateSceneObject(1, ownerId, "l0", 0x20); |
137 | = AssetHelpers.CreateNotecardAsset( | 133 | SceneObjectGroup soL1 = SceneHelpers.CreateSceneObject(1, ownerId, "l1", 0x21); |
138 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); | 134 | SceneObjectGroup soL2 = SceneHelpers.CreateSceneObject(1, ownerId, "l2", 0x22); |
139 | m_assetService.Store(ncAsset); | ||
140 | 135 | ||
141 | AssetBase embeddedAsset | 136 | TaskInventoryHelpers.AddScript( |
142 | = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); | 137 | m_assetService, soL2.RootPart, TestHelpers.ParseTail(0x33), TestHelpers.ParseTail(0x43), "l3-script", "gibberish"); |
143 | m_assetService.Store(embeddedAsset); | ||
144 | 138 | ||
145 | AssetBase secondLevelEmbeddedAsset | 139 | TaskInventoryHelpers.AddSceneObject( |
146 | = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); | 140 | m_assetService, soL1.RootPart, "l2-item", TestHelpers.ParseTail(0x32), soL2, TestHelpers.ParseTail(0x42)); |
147 | m_assetService.Store(secondLevelEmbeddedAsset); | 141 | TaskInventoryHelpers.AddSceneObject( |
142 | m_assetService, soL0.RootPart, "l1-item", TestHelpers.ParseTail(0x31), soL1, TestHelpers.ParseTail(0x41)); | ||
148 | 143 | ||
149 | m_uuidGatherer.AddForInspection(ncAssetId); | 144 | m_uuidGatherer.AddForInspection(soL0); |
150 | m_uuidGatherer.GatherAll(); | 145 | m_uuidGatherer.GatherAll(); |
151 | 146 | ||
152 | // foreach (UUID key in m_uuidGatherer.GatheredUuids.Keys) | 147 | // foreach (UUID key in m_uuidGatherer.GatheredUuids.Keys) |
153 | // System.Console.WriteLine("key : {0}", key); | 148 | // System.Console.WriteLine("key : {0}", key); |
154 | 149 | ||
155 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(3)); | 150 | // We expect to see the default prim texture and the assets of the contained task items |
156 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(ncAssetId)); | 151 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(4)); |
157 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); | 152 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(new UUID(Constants.DefaultTexture))); |
158 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); | 153 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(TestHelpers.ParseTail(0x41))); |
154 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(TestHelpers.ParseTail(0x42))); | ||
155 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(TestHelpers.ParseTail(0x43))); | ||
159 | } | 156 | } |
160 | } | 157 | } |
161 | } \ No newline at end of file | 158 | } \ No newline at end of file |