diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 0c4e364..f747c89 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -62,9 +62,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
62 | SerialiserModule serialiserModule = new SerialiserModule(); | 62 | SerialiserModule serialiserModule = new SerialiserModule(); |
63 | m_archiverModule = new InventoryArchiverModule(); | 63 | m_archiverModule = new InventoryArchiverModule(); |
64 | 64 | ||
65 | m_scene = SceneSetupHelpers.SetupScene("Inventory"); | 65 | m_scene = SceneSetupHelpers.SetupScene("asset inventory"); |
66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); | 66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); |
67 | } | 67 | } |
68 | |||
69 | [Test] | ||
70 | public void TestLoadCoalesecedItem() | ||
71 | { | ||
72 | TestHelper.InMethod(); | ||
73 | // log4net.Config.XmlConfigurator.Configure(); | ||
74 | |||
75 | UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "password"); | ||
76 | m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); | ||
77 | |||
78 | InventoryItemBase coaItem | ||
79 | = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); | ||
80 | |||
81 | Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); | ||
82 | |||
83 | string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID); | ||
84 | |||
85 | CoalescedSceneObjects coa; | ||
86 | bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa); | ||
87 | |||
88 | Assert.That(readResult, Is.True); | ||
89 | |||
90 | // TODO: Check that the loaded coalesence is valid and that the required scene object assets are around | ||
91 | } | ||
68 | 92 | ||
69 | /// <summary> | 93 | /// <summary> |
70 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive | 94 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive |
@@ -257,22 +281,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
257 | 281 | ||
258 | Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID)); | 282 | Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID)); |
259 | } | 283 | } |
260 | |||
261 | [Test] | ||
262 | public void TestLoadCoalesecedItem() | ||
263 | { | ||
264 | TestHelper.InMethod(); | ||
265 | // log4net.Config.XmlConfigurator.Configure(); | ||
266 | |||
267 | UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "password"); | ||
268 | m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); | ||
269 | |||
270 | InventoryItemBase coaItem | ||
271 | = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); | ||
272 | |||
273 | Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); | ||
274 | |||
275 | // TODO: Check that the loaded coalesence is valid and that the required scene object assets are around | ||
276 | } | ||
277 | } | 284 | } |
278 | } \ No newline at end of file | 285 | } \ No newline at end of file |