diff options
author | Justin Clark-Casey (justincc) | 2011-03-14 23:17:15 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-14 23:17:15 +0000 |
commit | 48c62eb51bdf475303ee3007354b98fd6fd4fc05 (patch) | |
tree | 44bdd7603474c04eb7b76ce2ab64a5c72df61818 /OpenSim/Data | |
parent | When setting media on a prim values, use generic object permissions instead o... (diff) | |
download | opensim-SC_OLD-48c62eb51bdf475303ee3007354b98fd6fd4fc05.zip opensim-SC_OLD-48c62eb51bdf475303ee3007354b98fd6fd4fc05.tar.gz opensim-SC_OLD-48c62eb51bdf475303ee3007354b98fd6fd4fc05.tar.bz2 opensim-SC_OLD-48c62eb51bdf475303ee3007354b98fd6fd4fc05.tar.xz |
Add current method output to all persistence level tests so that we can track where we are in the test suite
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/Tests/AssetTests.cs | 7 | ||||
-rw-r--r-- | OpenSim/Data/Tests/EstateTests.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/Tests/InventoryTests.cs | 27 | ||||
-rw-r--r-- | OpenSim/Data/Tests/RegionTests.cs | 59 |
4 files changed, 99 insertions, 11 deletions
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs index 32f74a9..b5ae244 100644 --- a/OpenSim/Data/Tests/AssetTests.cs +++ b/OpenSim/Data/Tests/AssetTests.cs | |||
@@ -32,6 +32,7 @@ using NUnit.Framework; | |||
32 | using NUnit.Framework.Constraints; | 32 | using NUnit.Framework.Constraints; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Tests.Common; | ||
35 | using System.Data.Common; | 36 | using System.Data.Common; |
36 | using log4net; | 37 | using log4net; |
37 | 38 | ||
@@ -105,6 +106,8 @@ namespace OpenSim.Data.Tests | |||
105 | [Test] | 106 | [Test] |
106 | public void T001_LoadEmpty() | 107 | public void T001_LoadEmpty() |
107 | { | 108 | { |
109 | TestHelper.InMethod(); | ||
110 | |||
108 | Assert.That(m_db.ExistsAsset(uuid1), Is.False); | 111 | Assert.That(m_db.ExistsAsset(uuid1), Is.False); |
109 | Assert.That(m_db.ExistsAsset(uuid2), Is.False); | 112 | Assert.That(m_db.ExistsAsset(uuid2), Is.False); |
110 | Assert.That(m_db.ExistsAsset(uuid3), Is.False); | 113 | Assert.That(m_db.ExistsAsset(uuid3), Is.False); |
@@ -113,6 +116,8 @@ namespace OpenSim.Data.Tests | |||
113 | [Test] | 116 | [Test] |
114 | public void T010_StoreReadVerifyAssets() | 117 | public void T010_StoreReadVerifyAssets() |
115 | { | 118 | { |
119 | TestHelper.InMethod(); | ||
120 | |||
116 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString()); | 121 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString()); |
117 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString()); | 122 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString()); |
118 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString()); | 123 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString()); |
@@ -178,6 +183,8 @@ namespace OpenSim.Data.Tests | |||
178 | [Test] | 183 | [Test] |
179 | public void T020_CheckForWeirdCreatorID() | 184 | public void T020_CheckForWeirdCreatorID() |
180 | { | 185 | { |
186 | TestHelper.InMethod(); | ||
187 | |||
181 | // It is expected that eventually the CreatorID might be an arbitrary string (an URI) | 188 | // It is expected that eventually the CreatorID might be an arbitrary string (an URI) |
182 | // rather than a valid UUID (?). This test is to make sure that the database layer does not | 189 | // rather than a valid UUID (?). This test is to make sure that the database layer does not |
183 | // attempt to convert CreatorID to GUID, but just passes it both ways as a string. | 190 | // attempt to convert CreatorID to GUID, but just passes it both ways as a string. |
diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs index 3354e28..8d332da 100644 --- a/OpenSim/Data/Tests/EstateTests.cs +++ b/OpenSim/Data/Tests/EstateTests.cs | |||
@@ -31,6 +31,7 @@ using NUnit.Framework; | |||
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Tests.Common; | ||
34 | using System.Text; | 35 | using System.Text; |
35 | using log4net; | 36 | using log4net; |
36 | using System.Reflection; | 37 | using System.Reflection; |
@@ -106,6 +107,8 @@ namespace OpenSim.Data.Tests | |||
106 | [Test] | 107 | [Test] |
107 | public void T010_EstateSettingsSimpleStorage_MinimumParameterSet() | 108 | public void T010_EstateSettingsSimpleStorage_MinimumParameterSet() |
108 | { | 109 | { |
110 | TestHelper.InMethod(); | ||
111 | |||
109 | EstateSettingsSimpleStorage( | 112 | EstateSettingsSimpleStorage( |
110 | REGION_ID, | 113 | REGION_ID, |
111 | DataTestUtil.STRING_MIN, | 114 | DataTestUtil.STRING_MIN, |
@@ -137,6 +140,8 @@ namespace OpenSim.Data.Tests | |||
137 | [Test] | 140 | [Test] |
138 | public void T011_EstateSettingsSimpleStorage_MaximumParameterSet() | 141 | public void T011_EstateSettingsSimpleStorage_MaximumParameterSet() |
139 | { | 142 | { |
143 | TestHelper.InMethod(); | ||
144 | |||
140 | EstateSettingsSimpleStorage( | 145 | EstateSettingsSimpleStorage( |
141 | REGION_ID, | 146 | REGION_ID, |
142 | DataTestUtil.STRING_MAX(64), | 147 | DataTestUtil.STRING_MAX(64), |
@@ -168,6 +173,8 @@ namespace OpenSim.Data.Tests | |||
168 | [Test] | 173 | [Test] |
169 | public void T012_EstateSettingsSimpleStorage_AccurateParameterSet() | 174 | public void T012_EstateSettingsSimpleStorage_AccurateParameterSet() |
170 | { | 175 | { |
176 | TestHelper.InMethod(); | ||
177 | |||
171 | EstateSettingsSimpleStorage( | 178 | EstateSettingsSimpleStorage( |
172 | REGION_ID, | 179 | REGION_ID, |
173 | DataTestUtil.STRING_MAX(1), | 180 | DataTestUtil.STRING_MAX(1), |
@@ -199,6 +206,8 @@ namespace OpenSim.Data.Tests | |||
199 | [Test] | 206 | [Test] |
200 | public void T012_EstateSettingsRandomStorage() | 207 | public void T012_EstateSettingsRandomStorage() |
201 | { | 208 | { |
209 | TestHelper.InMethod(); | ||
210 | |||
202 | // Letting estate store generate rows to database for us | 211 | // Letting estate store generate rows to database for us |
203 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); | 212 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); |
204 | new PropertyScrambler<EstateSettings>() | 213 | new PropertyScrambler<EstateSettings>() |
@@ -218,6 +227,8 @@ namespace OpenSim.Data.Tests | |||
218 | [Test] | 227 | [Test] |
219 | public void T020_EstateSettingsManagerList() | 228 | public void T020_EstateSettingsManagerList() |
220 | { | 229 | { |
230 | TestHelper.InMethod(); | ||
231 | |||
221 | // Letting estate store generate rows to database for us | 232 | // Letting estate store generate rows to database for us |
222 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); | 233 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); |
223 | 234 | ||
@@ -237,6 +248,8 @@ namespace OpenSim.Data.Tests | |||
237 | [Test] | 248 | [Test] |
238 | public void T021_EstateSettingsUserList() | 249 | public void T021_EstateSettingsUserList() |
239 | { | 250 | { |
251 | TestHelper.InMethod(); | ||
252 | |||
240 | // Letting estate store generate rows to database for us | 253 | // Letting estate store generate rows to database for us |
241 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); | 254 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); |
242 | 255 | ||
@@ -256,6 +269,8 @@ namespace OpenSim.Data.Tests | |||
256 | [Test] | 269 | [Test] |
257 | public void T022_EstateSettingsGroupList() | 270 | public void T022_EstateSettingsGroupList() |
258 | { | 271 | { |
272 | TestHelper.InMethod(); | ||
273 | |||
259 | // Letting estate store generate rows to database for us | 274 | // Letting estate store generate rows to database for us |
260 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); | 275 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); |
261 | 276 | ||
@@ -275,6 +290,8 @@ namespace OpenSim.Data.Tests | |||
275 | [Test] | 290 | [Test] |
276 | public void T022_EstateSettingsBanList() | 291 | public void T022_EstateSettingsBanList() |
277 | { | 292 | { |
293 | TestHelper.InMethod(); | ||
294 | |||
278 | // Letting estate store generate rows to database for us | 295 | // Letting estate store generate rows to database for us |
279 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); | 296 | EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); |
280 | 297 | ||
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; | |||
30 | using NUnit.Framework; | 30 | using NUnit.Framework; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Tests.Common; | ||
33 | using log4net; | 34 | using log4net; |
34 | using System.Reflection; | 35 | using System.Reflection; |
35 | using System.Data.Common; | 36 | using 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); |
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index 9598716..2dc177a 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs | |||
@@ -35,6 +35,7 @@ using OpenMetaverse; | |||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Tests.Common; | ||
38 | using log4net; | 39 | using log4net; |
39 | using System.Reflection; | 40 | using System.Reflection; |
40 | using System.Data.Common; | 41 | using System.Data.Common; |
@@ -120,15 +121,18 @@ namespace OpenSim.Data.Tests | |||
120 | string[] reg_tables = new string[] { | 121 | string[] reg_tables = new string[] { |
121 | "prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings" | 122 | "prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings" |
122 | }; | 123 | }; |
124 | |||
123 | if (m_rebuildDB) | 125 | if (m_rebuildDB) |
124 | { | 126 | { |
125 | DropTables(reg_tables); | 127 | DropTables(reg_tables); |
126 | ResetMigrations("RegionStore"); | 128 | ResetMigrations("RegionStore"); |
127 | }else | 129 | } |
130 | else | ||
131 | { | ||
128 | ClearTables(reg_tables); | 132 | ClearTables(reg_tables); |
133 | } | ||
129 | } | 134 | } |
130 | 135 | ||
131 | |||
132 | // Test Plan | 136 | // Test Plan |
133 | // Prims | 137 | // Prims |
134 | // - empty test - 001 | 138 | // - empty test - 001 |
@@ -147,6 +151,8 @@ namespace OpenSim.Data.Tests | |||
147 | [Test] | 151 | [Test] |
148 | public void T001_LoadEmpty() | 152 | public void T001_LoadEmpty() |
149 | { | 153 | { |
154 | TestHelper.InMethod(); | ||
155 | |||
150 | List<SceneObjectGroup> objs = db.LoadObjects(region1); | 156 | List<SceneObjectGroup> objs = db.LoadObjects(region1); |
151 | List<SceneObjectGroup> objs3 = db.LoadObjects(region3); | 157 | List<SceneObjectGroup> objs3 = db.LoadObjects(region3); |
152 | List<LandData> land = db.LoadLandObjects(region1); | 158 | List<LandData> land = db.LoadLandObjects(region1); |
@@ -163,6 +169,8 @@ namespace OpenSim.Data.Tests | |||
163 | [Test] | 169 | [Test] |
164 | public void T010_StoreSimpleObject() | 170 | public void T010_StoreSimpleObject() |
165 | { | 171 | { |
172 | TestHelper.InMethod(); | ||
173 | |||
166 | SceneObjectGroup sog = NewSOG("object1", prim1, region1); | 174 | SceneObjectGroup sog = NewSOG("object1", prim1, region1); |
167 | SceneObjectGroup sog2 = NewSOG("object2", prim2, region1); | 175 | SceneObjectGroup sog2 = NewSOG("object2", prim2, region1); |
168 | 176 | ||
@@ -196,6 +204,8 @@ namespace OpenSim.Data.Tests | |||
196 | [Test] | 204 | [Test] |
197 | public void T011_ObjectNames() | 205 | public void T011_ObjectNames() |
198 | { | 206 | { |
207 | TestHelper.InMethod(); | ||
208 | |||
199 | List<SceneObjectGroup> objs = db.LoadObjects(region1); | 209 | List<SceneObjectGroup> objs = db.LoadObjects(region1); |
200 | foreach (SceneObjectGroup sog in objs) | 210 | foreach (SceneObjectGroup sog in objs) |
201 | { | 211 | { |
@@ -208,6 +218,8 @@ namespace OpenSim.Data.Tests | |||
208 | [Test] | 218 | [Test] |
209 | public void T012_SceneParts() | 219 | public void T012_SceneParts() |
210 | { | 220 | { |
221 | TestHelper.InMethod(); | ||
222 | |||
211 | UUID tmp0 = UUID.Random(); | 223 | UUID tmp0 = UUID.Random(); |
212 | UUID tmp1 = UUID.Random(); | 224 | UUID tmp1 = UUID.Random(); |
213 | UUID tmp2 = UUID.Random(); | 225 | UUID tmp2 = UUID.Random(); |
@@ -241,6 +253,8 @@ namespace OpenSim.Data.Tests | |||
241 | [Test] | 253 | [Test] |
242 | public void T013_DatabasePersistency() | 254 | public void T013_DatabasePersistency() |
243 | { | 255 | { |
256 | TestHelper.InMethod(); | ||
257 | |||
244 | // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data | 258 | // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data |
245 | // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored | 259 | // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored |
246 | // The ObjectFlags is an exception, if it is entered incorrectly, the object IS REJECTED on the database silently. | 260 | // The ObjectFlags is an exception, if it is entered incorrectly, the object IS REJECTED on the database silently. |
@@ -416,6 +430,8 @@ namespace OpenSim.Data.Tests | |||
416 | [Test] | 430 | [Test] |
417 | public void T014_UpdateObject() | 431 | public void T014_UpdateObject() |
418 | { | 432 | { |
433 | TestHelper.InMethod(); | ||
434 | |||
419 | string text1 = "object1 text"; | 435 | string text1 = "object1 text"; |
420 | SceneObjectGroup sog = FindSOG("object1", region1); | 436 | SceneObjectGroup sog = FindSOG("object1", region1); |
421 | sog.RootPart.Text = text1; | 437 | sog.RootPart.Text = text1; |
@@ -521,6 +537,8 @@ namespace OpenSim.Data.Tests | |||
521 | [Test] | 537 | [Test] |
522 | public void T015_LargeSceneObjects() | 538 | public void T015_LargeSceneObjects() |
523 | { | 539 | { |
540 | TestHelper.InMethod(); | ||
541 | |||
524 | UUID id = UUID.Random(); | 542 | UUID id = UUID.Random(); |
525 | Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>(); | 543 | Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>(); |
526 | SceneObjectGroup sog = NewSOG("Test SOG", id, region4); | 544 | SceneObjectGroup sog = NewSOG("Test SOG", id, region4); |
@@ -565,6 +583,8 @@ namespace OpenSim.Data.Tests | |||
565 | //[Test] | 583 | //[Test] |
566 | public void T016_RandomSogWithSceneParts() | 584 | public void T016_RandomSogWithSceneParts() |
567 | { | 585 | { |
586 | TestHelper.InMethod(); | ||
587 | |||
568 | PropertyScrambler<SceneObjectPart> scrambler = | 588 | PropertyScrambler<SceneObjectPart> scrambler = |
569 | new PropertyScrambler<SceneObjectPart>() | 589 | new PropertyScrambler<SceneObjectPart>() |
570 | .DontScramble(x => x.UUID); | 590 | .DontScramble(x => x.UUID); |
@@ -631,15 +651,16 @@ namespace OpenSim.Data.Tests | |||
631 | return sog; | 651 | return sog; |
632 | } | 652 | } |
633 | 653 | ||
634 | |||
635 | // NOTE: it is a bad practice to rely on some of the previous tests having been run before. | 654 | // NOTE: it is a bad practice to rely on some of the previous tests having been run before. |
636 | // If the tests are run manually, one at a time, each starts with full class init (DB cleared). | 655 | // If the tests are run manually, one at a time, each starts with full class init (DB cleared). |
637 | // Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order. | 656 | // Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order. |
638 | // We shouldn't expect to find anything in the DB if we haven't put it there *in the same test*! | 657 | // We shouldn't expect to find anything in the DB if we haven't put it there *in the same test*! |
639 | 658 | ||
640 | [Test] | 659 | [Test] |
641 | public void T020_PrimInventoryEmpty() | 660 | public void T020_PrimInventoryEmpty() |
642 | { | 661 | { |
662 | TestHelper.InMethod(); | ||
663 | |||
643 | SceneObjectGroup sog = GetMySOG("object1"); | 664 | SceneObjectGroup sog = GetMySOG("object1"); |
644 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); | 665 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); |
645 | Assert.That(t, Is.Null); | 666 | Assert.That(t, Is.Null); |
@@ -659,10 +680,11 @@ namespace OpenSim.Data.Tests | |||
659 | db.StorePrimInventory(sog.RootPart.UUID, list); | 680 | db.StorePrimInventory(sog.RootPart.UUID, list); |
660 | } | 681 | } |
661 | 682 | ||
662 | |||
663 | [Test] | 683 | [Test] |
664 | public void T021_PrimInventoryBasic() | 684 | public void T021_PrimInventoryBasic() |
665 | { | 685 | { |
686 | TestHelper.InMethod(); | ||
687 | |||
666 | SceneObjectGroup sog = GetMySOG("object1"); | 688 | SceneObjectGroup sog = GetMySOG("object1"); |
667 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); | 689 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); |
668 | 690 | ||
@@ -690,20 +712,19 @@ namespace OpenSim.Data.Tests | |||
690 | Assert.That(t2.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))"); | 712 | Assert.That(t2.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))"); |
691 | 713 | ||
692 | // Removing inventory | 714 | // Removing inventory |
693 | |||
694 | List<TaskInventoryItem> list = new List<TaskInventoryItem>(); | 715 | List<TaskInventoryItem> list = new List<TaskInventoryItem>(); |
695 | db.StorePrimInventory(prim1, list); | 716 | db.StorePrimInventory(prim1, list); |
696 | 717 | ||
697 | sog = FindSOG("object1", region1); | 718 | sog = FindSOG("object1", region1); |
698 | t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); | 719 | t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); |
699 | Assert.That(t, Is.Null); | 720 | Assert.That(t, Is.Null); |
700 | |||
701 | } | 721 | } |
702 | |||
703 | 722 | ||
704 | [Test] | 723 | [Test] |
705 | public void T025_PrimInventoryPersistency() | 724 | public void T025_PrimInventoryPersistency() |
706 | { | 725 | { |
726 | TestHelper.InMethod(); | ||
727 | |||
707 | InventoryItemBase i = new InventoryItemBase(); | 728 | InventoryItemBase i = new InventoryItemBase(); |
708 | UUID id = UUID.Random(); | 729 | UUID id = UUID.Random(); |
709 | i.ID = id; | 730 | i.ID = id; |
@@ -775,6 +796,8 @@ namespace OpenSim.Data.Tests | |||
775 | [ExpectedException(typeof(ArgumentException))] | 796 | [ExpectedException(typeof(ArgumentException))] |
776 | public void T026_PrimInventoryMany() | 797 | public void T026_PrimInventoryMany() |
777 | { | 798 | { |
799 | TestHelper.InMethod(); | ||
800 | |||
778 | UUID i1,i2,i3,i4; | 801 | UUID i1,i2,i3,i4; |
779 | i1 = UUID.Random(); | 802 | i1 = UUID.Random(); |
780 | i2 = UUID.Random(); | 803 | i2 = UUID.Random(); |
@@ -805,15 +828,18 @@ namespace OpenSim.Data.Tests | |||
805 | [Test] | 828 | [Test] |
806 | public void T052_RemoveObject() | 829 | public void T052_RemoveObject() |
807 | { | 830 | { |
831 | TestHelper.InMethod(); | ||
832 | |||
808 | db.RemoveObject(prim1, region1); | 833 | db.RemoveObject(prim1, region1); |
809 | SceneObjectGroup sog = FindSOG("object1", region1); | 834 | SceneObjectGroup sog = FindSOG("object1", region1); |
810 | Assert.That(sog, Is.Null); | 835 | Assert.That(sog, Is.Null); |
811 | } | 836 | } |
812 | 837 | ||
813 | |||
814 | [Test] | 838 | [Test] |
815 | public void T100_DefaultRegionInfo() | 839 | public void T100_DefaultRegionInfo() |
816 | { | 840 | { |
841 | TestHelper.InMethod(); | ||
842 | |||
817 | RegionSettings r1 = db.LoadRegionSettings(region1); | 843 | RegionSettings r1 = db.LoadRegionSettings(region1); |
818 | Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))"); | 844 | Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))"); |
819 | 845 | ||
@@ -824,6 +850,8 @@ namespace OpenSim.Data.Tests | |||
824 | [Test] | 850 | [Test] |
825 | public void T101_UpdateRegionInfo() | 851 | public void T101_UpdateRegionInfo() |
826 | { | 852 | { |
853 | TestHelper.InMethod(); | ||
854 | |||
827 | int agentlimit = random.Next(); | 855 | int agentlimit = random.Next(); |
828 | double objectbonus = random.Next(); | 856 | double objectbonus = random.Next(); |
829 | int maturity = random.Next(); | 857 | int maturity = random.Next(); |
@@ -922,13 +950,14 @@ namespace OpenSim.Data.Tests | |||
922 | //Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid), "Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid))"); | 950 | //Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid), "Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid))"); |
923 | Assert.That(r1a.FixedSun,Is.True); | 951 | Assert.That(r1a.FixedSun,Is.True); |
924 | Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))"); | 952 | Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))"); |
925 | Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))"); | 953 | Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))"); |
926 | |||
927 | } | 954 | } |
928 | 955 | ||
929 | [Test] | 956 | [Test] |
930 | public void T300_NoTerrain() | 957 | public void T300_NoTerrain() |
931 | { | 958 | { |
959 | TestHelper.InMethod(); | ||
960 | |||
932 | Assert.That(db.LoadTerrain(zero), Is.Null); | 961 | Assert.That(db.LoadTerrain(zero), Is.Null); |
933 | Assert.That(db.LoadTerrain(region1), Is.Null); | 962 | Assert.That(db.LoadTerrain(region1), Is.Null); |
934 | Assert.That(db.LoadTerrain(region2), Is.Null); | 963 | Assert.That(db.LoadTerrain(region2), Is.Null); |
@@ -938,6 +967,8 @@ namespace OpenSim.Data.Tests | |||
938 | [Test] | 967 | [Test] |
939 | public void T301_CreateTerrain() | 968 | public void T301_CreateTerrain() |
940 | { | 969 | { |
970 | TestHelper.InMethod(); | ||
971 | |||
941 | double[,] t1 = GenTerrain(height1); | 972 | double[,] t1 = GenTerrain(height1); |
942 | db.StoreTerrain(t1, region1); | 973 | db.StoreTerrain(t1, region1); |
943 | 974 | ||
@@ -950,6 +981,8 @@ namespace OpenSim.Data.Tests | |||
950 | [Test] | 981 | [Test] |
951 | public void T302_FetchTerrain() | 982 | public void T302_FetchTerrain() |
952 | { | 983 | { |
984 | TestHelper.InMethod(); | ||
985 | |||
953 | double[,] baseterrain1 = GenTerrain(height1); | 986 | double[,] baseterrain1 = GenTerrain(height1); |
954 | double[,] baseterrain2 = GenTerrain(height2); | 987 | double[,] baseterrain2 = GenTerrain(height2); |
955 | double[,] t1 = db.LoadTerrain(region1); | 988 | double[,] t1 = db.LoadTerrain(region1); |
@@ -960,6 +993,8 @@ namespace OpenSim.Data.Tests | |||
960 | [Test] | 993 | [Test] |
961 | public void T303_UpdateTerrain() | 994 | public void T303_UpdateTerrain() |
962 | { | 995 | { |
996 | TestHelper.InMethod(); | ||
997 | |||
963 | double[,] baseterrain1 = GenTerrain(height1); | 998 | double[,] baseterrain1 = GenTerrain(height1); |
964 | double[,] baseterrain2 = GenTerrain(height2); | 999 | double[,] baseterrain2 = GenTerrain(height2); |
965 | db.StoreTerrain(baseterrain2, region1); | 1000 | db.StoreTerrain(baseterrain2, region1); |
@@ -972,6 +1007,8 @@ namespace OpenSim.Data.Tests | |||
972 | [Test] | 1007 | [Test] |
973 | public void T400_EmptyLand() | 1008 | public void T400_EmptyLand() |
974 | { | 1009 | { |
1010 | TestHelper.InMethod(); | ||
1011 | |||
975 | Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))"); | 1012 | Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))"); |
976 | Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))"); | 1013 | Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))"); |
977 | Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0))"); | 1014 | Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0))"); |