diff options
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory/Tests')
-rw-r--r-- | OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs index 380c54a..0b66835 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | |||
@@ -262,6 +262,31 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests | |||
262 | count = Regex.Matches(llsdresponse, notecards_folder).Count; | 262 | count = Regex.Matches(llsdresponse, notecards_folder).Count; |
263 | Assert.AreEqual(2, count, "More than 1 notecards folder in response"); // Notecards will also be under root, so 2 | 263 | Assert.AreEqual(2, count, "More than 1 notecards folder in response"); // Notecards will also be under root, so 2 |
264 | } | 264 | } |
265 | |||
266 | [Test] | ||
267 | public void Test_005_FolderZero() | ||
268 | { | ||
269 | TestHelpers.InMethod(); | ||
270 | |||
271 | Init(); | ||
272 | |||
273 | FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene); | ||
274 | TestOSHttpRequest req = new TestOSHttpRequest(); | ||
275 | TestOSHttpResponse resp = new TestOSHttpResponse(); | ||
276 | |||
277 | string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>"; | ||
278 | request += UUID.Zero; | ||
279 | request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>"; | ||
280 | |||
281 | string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); | ||
282 | |||
283 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); | ||
284 | Assert.That(llsdresponse != string.Empty, Is.True, "Incorrect empty response"); | ||
285 | Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder"); | ||
286 | |||
287 | Console.WriteLine(llsdresponse); | ||
288 | } | ||
289 | |||
265 | } | 290 | } |
266 | 291 | ||
267 | } \ No newline at end of file | 292 | } \ No newline at end of file |