aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/InventoryTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Tests/InventoryTests.cs')
-rw-r--r--OpenSim/Data/Tests/InventoryTests.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs
index 6cf7e20..cf3bac1 100644
--- a/OpenSim/Data/Tests/InventoryTests.cs
+++ b/OpenSim/Data/Tests/InventoryTests.cs
@@ -30,6 +30,7 @@ using log4net.Config;
30using NUnit.Framework; 30using NUnit.Framework;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Tests.Common;
33using log4net; 34using log4net;
34using System.Reflection; 35using System.Reflection;
35using System.Data.Common; 36using System.Data.Common;
@@ -113,6 +114,8 @@ namespace OpenSim.Data.Tests
113 [Test] 114 [Test]
114 public void T001_LoadEmpty() 115 public void T001_LoadEmpty()
115 { 116 {
117 TestHelper.InMethod();
118
116 Assert.That(db.getInventoryFolder(zero), Is.Null); 119 Assert.That(db.getInventoryFolder(zero), Is.Null);
117 Assert.That(db.getInventoryFolder(folder1), Is.Null); 120 Assert.That(db.getInventoryFolder(folder1), Is.Null);
118 Assert.That(db.getInventoryFolder(folder2), Is.Null); 121 Assert.That(db.getInventoryFolder(folder2), Is.Null);
@@ -131,6 +134,8 @@ namespace OpenSim.Data.Tests
131 [Test] 134 [Test]
132 public void T010_FolderNonParent() 135 public void T010_FolderNonParent()
133 { 136 {
137 TestHelper.InMethod();
138
134 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2); 139 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
135 // the folder will go in 140 // the folder will go in
136 db.addInventoryFolder(f1); 141 db.addInventoryFolder(f1);
@@ -141,6 +146,8 @@ namespace OpenSim.Data.Tests
141 [Test] 146 [Test]
142 public void T011_FolderCreate() 147 public void T011_FolderCreate()
143 { 148 {
149 TestHelper.InMethod();
150
144 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1); 151 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
145 // TODO: this is probably wrong behavior, but is what we have 152 // TODO: this is probably wrong behavior, but is what we have
146 // db.updateInventoryFolder(f1); 153 // db.updateInventoryFolder(f1);
@@ -164,6 +171,8 @@ namespace OpenSim.Data.Tests
164 [Test] 171 [Test]
165 public void T012_FolderList() 172 public void T012_FolderList()
166 { 173 {
174 TestHelper.InMethod();
175
167 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3); 176 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
168 db.addInventoryFolder(f2); 177 db.addInventoryFolder(f2);
169 178
@@ -178,6 +187,8 @@ namespace OpenSim.Data.Tests
178 [Test] 187 [Test]
179 public void T013_FolderHierarchy() 188 public void T013_FolderHierarchy()
180 { 189 {
190 TestHelper.InMethod();
191
181 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned) 192 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
182 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 193 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
183 n = db.getFolderHierarchy(folder1).Count; 194 n = db.getFolderHierarchy(folder1).Count;
@@ -191,6 +202,8 @@ namespace OpenSim.Data.Tests
191 [Test] 202 [Test]
192 public void T014_MoveFolder() 203 public void T014_MoveFolder()
193 { 204 {
205 TestHelper.InMethod();
206
194 InventoryFolderBase f2 = db.getInventoryFolder(folder2); 207 InventoryFolderBase f2 = db.getInventoryFolder(folder2);
195 f2.ParentID = folder3; 208 f2.ParentID = folder3;
196 db.moveInventoryFolder(f2); 209 db.moveInventoryFolder(f2);
@@ -205,6 +218,8 @@ namespace OpenSim.Data.Tests
205 [Test] 218 [Test]
206 public void T015_FolderHierarchy() 219 public void T015_FolderHierarchy()
207 { 220 {
221 TestHelper.InMethod();
222
208 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 223 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
209 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))"); 224 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
210 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))"); 225 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))");
@@ -216,6 +231,8 @@ namespace OpenSim.Data.Tests
216 [Test] 231 [Test]
217 public void T100_NoItems() 232 public void T100_NoItems()
218 { 233 {
234 TestHelper.InMethod();
235
219 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))"); 236 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
220 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))"); 237 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
221 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))"); 238 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))");
@@ -228,6 +245,8 @@ namespace OpenSim.Data.Tests
228 [Test] 245 [Test]
229 public void T101_CreatItems() 246 public void T101_CreatItems()
230 { 247 {
248 TestHelper.InMethod();
249
231 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1)); 250 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
232 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2)); 251 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
233 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3)); 252 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3));
@@ -237,6 +256,8 @@ namespace OpenSim.Data.Tests
237 [Test] 256 [Test]
238 public void T102_CompareItems() 257 public void T102_CompareItems()
239 { 258 {
259 TestHelper.InMethod();
260
240 InventoryItemBase i1 = db.getInventoryItem(item1); 261 InventoryItemBase i1 = db.getInventoryItem(item1);
241 InventoryItemBase i2 = db.getInventoryItem(item2); 262 InventoryItemBase i2 = db.getInventoryItem(item2);
242 InventoryItemBase i3 = db.getInventoryItem(item3); 263 InventoryItemBase i3 = db.getInventoryItem(item3);
@@ -254,6 +275,8 @@ namespace OpenSim.Data.Tests
254 [Test] 275 [Test]
255 public void T103_UpdateItem() 276 public void T103_UpdateItem()
256 { 277 {
278 TestHelper.InMethod();
279
257 // TODO: probably shouldn't have the ability to have an 280 // TODO: probably shouldn't have the ability to have an
258 // owner of an item in a folder not owned by the user 281 // owner of an item in a folder not owned by the user
259 282
@@ -272,6 +295,8 @@ namespace OpenSim.Data.Tests
272 [Test] 295 [Test]
273 public void T104_RandomUpdateItem() 296 public void T104_RandomUpdateItem()
274 { 297 {
298 TestHelper.InMethod();
299
275 PropertyScrambler<InventoryFolderBase> folderScrambler = 300 PropertyScrambler<InventoryFolderBase> folderScrambler =
276 new PropertyScrambler<InventoryFolderBase>() 301 new PropertyScrambler<InventoryFolderBase>()
277 .DontScramble(x => x.Owner) 302 .DontScramble(x => x.Owner)
@@ -329,6 +354,8 @@ namespace OpenSim.Data.Tests
329 [Test] 354 [Test]
330 public void T999_StillNull() 355 public void T999_StillNull()
331 { 356 {
357 TestHelper.InMethod();
358
332 // After all tests are run, these should still return no results 359 // After all tests are run, these should still return no results
333 Assert.That(db.getInventoryFolder(zero), Is.Null); 360 Assert.That(db.getInventoryFolder(zero), Is.Null);
334 Assert.That(db.getInventoryItem(zero), Is.Null); 361 Assert.That(db.getInventoryItem(zero), Is.Null);