aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/InventoryTests.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Tests/InventoryTests.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs
index e4ec5c1..da6e7d4 100644
--- a/OpenSim/Data/Tests/InventoryTests.cs
+++ b/OpenSim/Data/Tests/InventoryTests.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Data.Tests
46{ 46{
47 [TestFixture(Description = "Inventory store tests (MySQL)")] 47 [TestFixture(Description = "Inventory store tests (MySQL)")]
48 public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData> 48 public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData>
49 { 49 {
50 } 50 }
51 51
52 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore> 52 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore>
@@ -102,7 +102,7 @@ namespace OpenSim.Data.Tests
102 public void T001_LoadEmpty() 102 public void T001_LoadEmpty()
103 { 103 {
104 TestHelpers.InMethod(); 104 TestHelpers.InMethod();
105 105
106 Assert.That(db.getInventoryFolder(zero), Is.Null); 106 Assert.That(db.getInventoryFolder(zero), Is.Null);
107 Assert.That(db.getInventoryFolder(folder1), Is.Null); 107 Assert.That(db.getInventoryFolder(folder1), Is.Null);
108 Assert.That(db.getInventoryFolder(folder2), Is.Null); 108 Assert.That(db.getInventoryFolder(folder2), Is.Null);
@@ -122,7 +122,7 @@ namespace OpenSim.Data.Tests
122 public void T010_FolderNonParent() 122 public void T010_FolderNonParent()
123 { 123 {
124 TestHelpers.InMethod(); 124 TestHelpers.InMethod();
125 125
126 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2); 126 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
127 // the folder will go in 127 // the folder will go in
128 db.addInventoryFolder(f1); 128 db.addInventoryFolder(f1);
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Tests
134 public void T011_FolderCreate() 134 public void T011_FolderCreate()
135 { 135 {
136 TestHelpers.InMethod(); 136 TestHelpers.InMethod();
137 137
138 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1); 138 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
139 // TODO: this is probably wrong behavior, but is what we have 139 // TODO: this is probably wrong behavior, but is what we have
140 // db.updateInventoryFolder(f1); 140 // db.updateInventoryFolder(f1);
@@ -159,7 +159,7 @@ namespace OpenSim.Data.Tests
159 public void T012_FolderList() 159 public void T012_FolderList()
160 { 160 {
161 TestHelpers.InMethod(); 161 TestHelpers.InMethod();
162 162
163 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3); 163 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
164 db.addInventoryFolder(f2); 164 db.addInventoryFolder(f2);
165 165
@@ -175,7 +175,7 @@ namespace OpenSim.Data.Tests
175 public void T013_FolderHierarchy() 175 public void T013_FolderHierarchy()
176 { 176 {
177 TestHelpers.InMethod(); 177 TestHelpers.InMethod();
178 178
179 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned) 179 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
180 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 180 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
181 n = db.getFolderHierarchy(folder1).Count; 181 n = db.getFolderHierarchy(folder1).Count;
@@ -190,7 +190,7 @@ namespace OpenSim.Data.Tests
190 public void T014_MoveFolder() 190 public void T014_MoveFolder()
191 { 191 {
192 TestHelpers.InMethod(); 192 TestHelpers.InMethod();
193 193
194 InventoryFolderBase f2 = db.getInventoryFolder(folder2); 194 InventoryFolderBase f2 = db.getInventoryFolder(folder2);
195 f2.ParentID = folder3; 195 f2.ParentID = folder3;
196 db.moveInventoryFolder(f2); 196 db.moveInventoryFolder(f2);
@@ -206,7 +206,7 @@ namespace OpenSim.Data.Tests
206 public void T015_FolderHierarchy() 206 public void T015_FolderHierarchy()
207 { 207 {
208 TestHelpers.InMethod(); 208 TestHelpers.InMethod();
209 209
210 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 210 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
211 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))"); 211 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
212 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))"); 212 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))");
@@ -219,7 +219,7 @@ namespace OpenSim.Data.Tests
219 public void T100_NoItems() 219 public void T100_NoItems()
220 { 220 {
221 TestHelpers.InMethod(); 221 TestHelpers.InMethod();
222 222
223 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))"); 223 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
224 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))"); 224 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
225 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))"); 225 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))");
@@ -233,7 +233,7 @@ namespace OpenSim.Data.Tests
233 public void T101_CreatItems() 233 public void T101_CreatItems()
234 { 234 {
235 TestHelpers.InMethod(); 235 TestHelpers.InMethod();
236 236
237 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1)); 237 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
238 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2)); 238 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
239 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3)); 239 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3));
@@ -244,7 +244,7 @@ namespace OpenSim.Data.Tests
244 public void T102_CompareItems() 244 public void T102_CompareItems()
245 { 245 {
246 TestHelpers.InMethod(); 246 TestHelpers.InMethod();
247 247
248 InventoryItemBase i1 = db.getInventoryItem(item1); 248 InventoryItemBase i1 = db.getInventoryItem(item1);
249 InventoryItemBase i2 = db.getInventoryItem(item2); 249 InventoryItemBase i2 = db.getInventoryItem(item2);
250 InventoryItemBase i3 = db.getInventoryItem(item3); 250 InventoryItemBase i3 = db.getInventoryItem(item3);
@@ -263,7 +263,7 @@ namespace OpenSim.Data.Tests
263 public void T103_UpdateItem() 263 public void T103_UpdateItem()
264 { 264 {
265 TestHelpers.InMethod(); 265 TestHelpers.InMethod();
266 266
267 // TODO: probably shouldn't have the ability to have an 267 // TODO: probably shouldn't have the ability to have an
268 // owner of an item in a folder not owned by the user 268 // owner of an item in a folder not owned by the user
269 269
@@ -283,7 +283,7 @@ namespace OpenSim.Data.Tests
283 public void T104_RandomUpdateItem() 283 public void T104_RandomUpdateItem()
284 { 284 {
285 TestHelpers.InMethod(); 285 TestHelpers.InMethod();
286 286
287 PropertyScrambler<InventoryFolderBase> folderScrambler = 287 PropertyScrambler<InventoryFolderBase> folderScrambler =
288 new PropertyScrambler<InventoryFolderBase>() 288 new PropertyScrambler<InventoryFolderBase>()
289 .DontScramble(x => x.Owner) 289 .DontScramble(x => x.Owner)
@@ -342,7 +342,7 @@ namespace OpenSim.Data.Tests
342 public void T999_StillNull() 342 public void T999_StillNull()
343 { 343 {
344 TestHelpers.InMethod(); 344 TestHelpers.InMethod();
345 345
346 // After all tests are run, these should still return no results 346 // After all tests are run, these should still return no results
347 Assert.That(db.getInventoryFolder(zero), Is.Null); 347 Assert.That(db.getInventoryFolder(zero), Is.Null);
348 Assert.That(db.getInventoryItem(zero), Is.Null); 348 Assert.That(db.getInventoryItem(zero), Is.Null);