aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-10 22:56:11 +0000
committerJustin Clark-Casey (justincc)2011-03-10 22:56:11 +0000
commitad1dea5affe24674ada19b801cab423f667f7979 (patch)
tree223ca67d56c7f34c39e08ed342a980fad9ca09f7 /OpenSim
parentrefactor: rename test user account fields (diff)
downloadopensim-SC_OLD-ad1dea5affe24674ada19b801cab423f667f7979.zip
opensim-SC_OLD-ad1dea5affe24674ada19b801cab423f667f7979.tar.gz
opensim-SC_OLD-ad1dea5affe24674ada19b801cab423f667f7979.tar.bz2
opensim-SC_OLD-ad1dea5affe24674ada19b801cab423f667f7979.tar.xz
Add test for simple case where creator account with appropriate uuid exists on the target system for an iar load
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index c7aad5e..7f156f8 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -179,6 +179,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
179 } 179 }
180 180
181 /// <summary> 181 /// <summary>
182 /// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized
183 /// objects.
184 /// </summary>
185 [Test]
186 public void TestLoadIarCreatorAccountPresent()
187 {
188 TestHelper.InMethod();
189// log4net.Config.XmlConfigurator.Configure();
190
191 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood");
192
193 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream);
194 InventoryItemBase foundItem1
195 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name);
196
197 Assert.That(
198 foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()),
199 "Loaded item non-uuid creator doesn't match original");
200 Assert.That(
201 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID),
202 "Loaded item uuid creator doesn't match original");
203 Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID),
204 "Loaded item owner doesn't match inventory reciever");
205
206 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
207 string xmlData = Utils.BytesToString(asset1.Data);
208 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
209
210 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID));
211 }
212
213 /// <summary>
182 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where 214 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
183 /// an account exists with the same name as the creator, though not the same id. 215 /// an account exists with the same name as the creator, though not the same id.
184 /// </summary> 216 /// </summary>