aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index c97a765..0ff6f7f 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common
43 public class TestInventoryDataPlugin : IInventoryDataPlugin 43 public class TestInventoryDataPlugin : IInventoryDataPlugin
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <value> 47 /// <value>
48 /// Inventory folders 48 /// Inventory folders
49 /// </value> 49 /// </value>
@@ -85,9 +85,9 @@ namespace OpenSim.Tests.Common
85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID) 85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
86 { 86 {
87// InventoryFolderBase folder = m_folders[folderID]; 87// InventoryFolderBase folder = m_folders[folderID];
88 88
89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID); 89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
90 90
91 List<InventoryItemBase> items = new List<InventoryItemBase>(); 91 List<InventoryItemBase> items = new List<InventoryItemBase>();
92 92
93 foreach (InventoryItemBase item in m_items.Values) 93 foreach (InventoryItemBase item in m_items.Values)
@@ -98,7 +98,7 @@ namespace OpenSim.Tests.Common
98 items.Add(item); 98 items.Add(item);
99 } 99 }
100 } 100 }
101 101
102 return items; 102 return items;
103 } 103 }
104 104
@@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common
107 public InventoryFolderBase getUserRootFolder(UUID user) 107 public InventoryFolderBase getUserRootFolder(UUID user)
108 { 108 {
109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); 109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
110 110
111 InventoryFolderBase folder = null; 111 InventoryFolderBase folder = null;
112 m_rootFolders.TryGetValue(user, out folder); 112 m_rootFolders.TryGetValue(user, out folder);
113 113
@@ -117,9 +117,9 @@ namespace OpenSim.Tests.Common
117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID) 117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
118 { 118 {
119// InventoryFolderBase parentFolder = m_folders[parentID]; 119// InventoryFolderBase parentFolder = m_folders[parentID];
120 120
121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID); 121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
122 122
123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
124 124
125 foreach (InventoryFolderBase folder in m_folders.Values) 125 foreach (InventoryFolderBase folder in m_folders.Values)
@@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common
127 if (folder.ParentID == parentID) 127 if (folder.ParentID == parentID)
128 { 128 {
129// m_log.DebugFormat( 129// m_log.DebugFormat(
130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", 130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID); 131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
132 132
133 folders.Add(folder); 133 folders.Add(folder);
134 } 134 }
135 } 135 }
@@ -153,9 +153,9 @@ namespace OpenSim.Tests.Common
153 public void addInventoryFolder(InventoryFolderBase folder) 153 public void addInventoryFolder(InventoryFolderBase folder)
154 { 154 {
155// m_log.DebugFormat( 155// m_log.DebugFormat(
156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}", 156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
157// folder.Name, folder.ID, (AssetType)folder.Type); 157// folder.Name, folder.ID, (AssetType)folder.Type);
158 158
159 m_folders[folder.ID] = folder; 159 m_folders[folder.ID] = folder;
160 160
161 if (folder.ParentID == UUID.Zero) 161 if (folder.ParentID == UUID.Zero)
@@ -183,30 +183,30 @@ namespace OpenSim.Tests.Common
183 m_folders.Remove(folderId); 183 m_folders.Remove(folderId);
184 } 184 }
185 185
186 public void addInventoryItem(InventoryItemBase item) 186 public void addInventoryItem(InventoryItemBase item)
187 { 187 {
188 InventoryFolderBase folder = m_folders[item.Folder]; 188 InventoryFolderBase folder = m_folders[item.Folder];
189 189
190// m_log.DebugFormat( 190// m_log.DebugFormat(
191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID); 191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
192 192
193 m_items[item.ID] = item; 193 m_items[item.ID] = item;
194 } 194 }
195 195
196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); } 196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
197 197
198 public void deleteInventoryItem(UUID itemId) 198 public void deleteInventoryItem(UUID itemId)
199 { 199 {
200 if (m_items.ContainsKey(itemId)) 200 if (m_items.ContainsKey(itemId))
201 m_items.Remove(itemId); 201 m_items.Remove(itemId);
202 } 202 }
203 203
204 public InventoryItemBase getInventoryItem(UUID itemId) 204 public InventoryItemBase getInventoryItem(UUID itemId)
205 { 205 {
206 if (m_items.ContainsKey(itemId)) 206 if (m_items.ContainsKey(itemId))
207 return m_items[itemId]; 207 return m_items[itemId];
208 else 208 else
209 return null; 209 return null;
210 } 210 }
211 211
212 public InventoryItemBase queryInventoryItem(UUID item) 212 public InventoryItemBase queryInventoryItem(UUID item)