aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
index be3a0cb..2b272e6 100644
--- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
@@ -46,20 +46,33 @@ namespace OpenSim.Tests.Common
46 46
47 public XInventoryItem[] GetItems(string[] fields, string[] vals) 47 public XInventoryItem[] GetItems(string[] fields, string[] vals)
48 { 48 {
49// Console.WriteLine(
50// "Requesting items, fields {0}, vals {1}", string.Join(", ", fields), string.Join(", ", vals));
51
49 List<XInventoryItem> origItems = Get<XInventoryItem>(fields, vals, m_allItems.Values.ToList()); 52 List<XInventoryItem> origItems = Get<XInventoryItem>(fields, vals, m_allItems.Values.ToList());
50 53
51 return origItems.Select(i => i.Clone()).ToArray(); 54 XInventoryItem[] items = origItems.Select(i => i.Clone()).ToArray();
55
56// Console.WriteLine("Found {0} items", items.Length);
57// Array.ForEach(items, i => Console.WriteLine("Found item {0} {1}", i.inventoryName, i.inventoryID));
58
59 return items;
52 } 60 }
53 61
54 public XInventoryFolder[] GetFolders(string[] fields, string[] vals) 62 public XInventoryFolder[] GetFolders(string[] fields, string[] vals)
55 { 63 {
56// Console.WriteLine( 64// Console.WriteLine(
57// "Requesting folders, fields {0}, vals {1}", string.Join(",", fields), string.Join(",", vals)); 65// "Requesting folders, fields {0}, vals {1}", string.Join(", ", fields), string.Join(", ", vals));
58 66
59 List<XInventoryFolder> origFolders 67 List<XInventoryFolder> origFolders
60 = Get<XInventoryFolder>(fields, vals, m_allFolders.Values.ToList()); 68 = Get<XInventoryFolder>(fields, vals, m_allFolders.Values.ToList());
61 69
62 return origFolders.Select(f => f.Clone()).ToArray(); 70 XInventoryFolder[] folders = origFolders.Select(f => f.Clone()).ToArray();
71
72// Console.WriteLine("Found {0} folders", folders.Length);
73// Array.ForEach(folders, f => Console.WriteLine("Found folder {0} {1}", f.folderName, f.folderID));
74
75 return folders;
63 } 76 }
64 77
65 public bool StoreFolder(XInventoryFolder folder) 78 public bool StoreFolder(XInventoryFolder folder)
@@ -75,7 +88,9 @@ namespace OpenSim.Tests.Common
75 { 88 {
76 m_allItems[item.inventoryID] = item.Clone(); 89 m_allItems[item.inventoryID] = item.Clone();
77 90
78// Console.WriteLine("Added item {0} {1}, creator {2}, owner {3}", item.inventoryName, item.inventoryID, item.creatorID, item.avatarID); 91// Console.WriteLine(
92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}",
93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID);
79 94
80 return true; 95 return true;
81 } 96 }