aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-02-25 20:30:03 +0000
committerJustin Clark-Casey (justincc)2015-02-25 20:30:03 +0000
commitb1b72d7c2f16e7d1e239a0579dc0b28ea9812ed7 (patch)
treee271b19776ad3a956730a947af3764de2c645431 /OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
parentOn shutdown (job engine stop), don't allow the ObjectDisposedException on Blo... (diff)
downloadopensim-SC_OLD-b1b72d7c2f16e7d1e239a0579dc0b28ea9812ed7.zip
opensim-SC_OLD-b1b72d7c2f16e7d1e239a0579dc0b28ea9812ed7.tar.gz
opensim-SC_OLD-b1b72d7c2f16e7d1e239a0579dc0b28ea9812ed7.tar.bz2
opensim-SC_OLD-b1b72d7c2f16e7d1e239a0579dc0b28ea9812ed7.tar.xz
Reduce coupling in regression test task inventory creation methods to make them usable in tests with no scene present
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs39
1 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index 4ae27d7..0b41039 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
89 { 89 {
90 TestHelpers.InMethod(); 90 TestHelpers.InMethod();
91// TestHelpers.EnableLogging(); 91// TestHelpers.EnableLogging();
92 92
93 UUID ownerId = TestHelpers.ParseTail(0x10); 93 UUID ownerId = TestHelpers.ParseTail(0x10);
94 UUID embeddedId = TestHelpers.ParseTail(0x20); 94 UUID embeddedId = TestHelpers.ParseTail(0x20);
95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); 95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21);
@@ -120,5 +120,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests
120 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); 120 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId));
121 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); 121 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId));
122 } 122 }
123
124 [Test]
125 public void TestTaskItem()
126 {
127 TestHelpers.InMethod();
128 TestHelpers.EnableLogging();
129
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
136 AssetBase ncAsset
137 = AssetHelpers.CreateNotecardAsset(
138 ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId));
139 m_assetService.Store(ncAsset);
140
141 AssetBase embeddedAsset
142 = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId));
143 m_assetService.Store(embeddedAsset);
144
145 AssetBase secondLevelEmbeddedAsset
146 = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when.");
147 m_assetService.Store(secondLevelEmbeddedAsset);
148
149 m_uuidGatherer.AddForInspection(ncAssetId);
150 m_uuidGatherer.GatherAll();
151
152 // foreach (UUID key in m_uuidGatherer.GatheredUuids.Keys)
153 // System.Console.WriteLine("key : {0}", key);
154
155 Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(3));
156 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(ncAssetId));
157 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId));
158 Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId));
159 }
123 } 160 }
124} \ No newline at end of file 161} \ No newline at end of file