aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
diff options
context:
space:
mode:
authorSean Dague2009-08-06 14:03:16 -0400
committerSean Dague2009-08-06 14:03:16 -0400
commit4078a331e2e851c051293472776ebebcc5dbaecc (patch)
treec172fb9173821f9a30d37ee336f6592ccaf4510f /OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
parentskip sqlite tests on z linux, as sqlite doesn't work right on the platform (diff)
parentAdd the config-include statement to OpenSim.ini.example. (diff)
downloadopensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.zip
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.gz
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.bz2
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs45
1 files changed, 31 insertions, 14 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 442ff06..1b14abb 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -39,12 +39,17 @@ namespace OpenSim.Tests.Common.Mock
39 /// tests are single threaded. 39 /// tests are single threaded.
40 /// </summary> 40 /// </summary>
41 public class TestInventoryDataPlugin : IInventoryDataPlugin 41 public class TestInventoryDataPlugin : IInventoryDataPlugin
42 { 42 {
43 /// <value> 43 /// <value>
44 /// Known inventory folders 44 /// Inventory folders
45 /// </value> 45 /// </value>
46 private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>(); 46 private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>();
47 47
48 //// <value>
49 /// Inventory items
50 /// </value>
51 private Dictionary<UUID, InventoryItemBase> m_items = new Dictionary<UUID, InventoryItemBase>();
52
48 /// <value> 53 /// <value>
49 /// User root folders 54 /// User root folders
50 /// </value> 55 /// </value>
@@ -99,9 +104,7 @@ namespace OpenSim.Tests.Common.Mock
99 } 104 }
100 105
101 return folders; 106 return folders;
102 } 107 }
103
104 public InventoryItemBase getInventoryItem(UUID item) { return null; }
105 108
106 public InventoryFolderBase getInventoryFolder(UUID folderId) 109 public InventoryFolderBase getInventoryFolder(UUID folderId)
107 { 110 {
@@ -111,15 +114,6 @@ namespace OpenSim.Tests.Common.Mock
111 return folder; 114 return folder;
112 } 115 }
113 116
114 public void addInventoryItem(InventoryItemBase item) {}
115 public void updateInventoryItem(InventoryItemBase item) {}
116 public void deleteInventoryItem(UUID item) {}
117
118 public InventoryItemBase queryInventoryItem(UUID item)
119 {
120 return null;
121 }
122
123 public InventoryFolderBase queryInventoryFolder(UUID folderID) 117 public InventoryFolderBase queryInventoryFolder(UUID folderID)
124 { 118 {
125 return getInventoryFolder(folderID); 119 return getInventoryFolder(folderID);
@@ -150,6 +144,29 @@ namespace OpenSim.Tests.Common.Mock
150 m_folders.Remove(folderId); 144 m_folders.Remove(folderId);
151 } 145 }
152 146
147 public void addInventoryItem(InventoryItemBase item) { m_items[item.ID] = item; }
148
149 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
150
151 public void deleteInventoryItem(UUID itemId)
152 {
153 if (m_items.ContainsKey(itemId))
154 m_items.Remove(itemId);
155 }
156
157 public InventoryItemBase getInventoryItem(UUID itemId)
158 {
159 if (m_items.ContainsKey(itemId))
160 return m_items[itemId];
161 else
162 return null;
163 }
164
165 public InventoryItemBase queryInventoryItem(UUID item)
166 {
167 return null;
168 }
169
153 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } 170 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; }
154 } 171 }
155} 172}