aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs45
-rw-r--r--OpenSim/Tests/Common/TestHelper.cs2
2 files changed, 32 insertions, 15 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}
diff --git a/OpenSim/Tests/Common/TestHelper.cs b/OpenSim/Tests/Common/TestHelper.cs
index f0b3376..4abf2e3 100644
--- a/OpenSim/Tests/Common/TestHelper.cs
+++ b/OpenSim/Tests/Common/TestHelper.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Tests.Common
54 public static void InMethod() 54 public static void InMethod()
55 { 55 {
56 StackTrace stackTrace = new StackTrace(); 56 StackTrace stackTrace = new StackTrace();
57 Console.WriteLine("==> In Test Method : {0}", stackTrace.GetFrame(1).GetMethod().Name); 57 Console.WriteLine("===> In Test Method : {0} <===", stackTrace.GetFrame(1).GetMethod().Name);
58 } 58 }
59 } 59 }
60} 60}