diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/Tests/BasicRegionTest.cs | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index 1978fc7..6cdedd6 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -40,6 +40,7 @@ namespace OpenSim.Data.Tests | |||
40 | public class BasicRegionTest | 40 | public class BasicRegionTest |
41 | { | 41 | { |
42 | public IRegionDataStore db; | 42 | public IRegionDataStore db; |
43 | public UUID zero = UUID.Zero; | ||
43 | public UUID region1; | 44 | public UUID region1; |
44 | public UUID region2; | 45 | public UUID region2; |
45 | public UUID prim1; | 46 | public UUID prim1; |
@@ -168,9 +169,9 @@ namespace OpenSim.Data.Tests | |||
168 | public void T021_PrimInventoryStore() | 169 | public void T021_PrimInventoryStore() |
169 | { | 170 | { |
170 | SceneObjectGroup sog = FindSOG("object1", region1); | 171 | SceneObjectGroup sog = FindSOG("object1", region1); |
171 | InventoryItemBase i = NewItem(item1, UUID.Zero, UUID.Zero, itemname1, UUID.Zero); | 172 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); |
172 | 173 | ||
173 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, UUID.Zero), Is.True); | 174 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True); |
174 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); | 175 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); |
175 | Assert.That(t.Name, Is.EqualTo(itemname1)); | 176 | Assert.That(t.Name, Is.EqualTo(itemname1)); |
176 | 177 | ||
@@ -255,7 +256,10 @@ namespace OpenSim.Data.Tests | |||
255 | [Test] | 256 | [Test] |
256 | public void T300_NoTerrain() | 257 | public void T300_NoTerrain() |
257 | { | 258 | { |
258 | db.LoadTerrain(region1); | 259 | Assert.That(db.LoadTerrain(zero), Is.Null); |
260 | Assert.That(db.LoadTerrain(region1), Is.Null); | ||
261 | Assert.That(db.LoadTerrain(region2), Is.Null); | ||
262 | Assert.That(db.LoadTerrain(UUID.Random()), Is.Null); | ||
259 | } | 263 | } |
260 | 264 | ||
261 | [Test] | 265 | [Test] |
@@ -263,6 +267,11 @@ namespace OpenSim.Data.Tests | |||
263 | { | 267 | { |
264 | double[,] t1 = GenTerrain(height1); | 268 | double[,] t1 = GenTerrain(height1); |
265 | db.StoreTerrain(t1, region1); | 269 | db.StoreTerrain(t1, region1); |
270 | |||
271 | Assert.That(db.LoadTerrain(zero), Is.Null); | ||
272 | Assert.That(db.LoadTerrain(region1), Is.Not.Null); | ||
273 | Assert.That(db.LoadTerrain(region2), Is.Null); | ||
274 | Assert.That(db.LoadTerrain(UUID.Random()), Is.Null); | ||
266 | } | 275 | } |
267 | 276 | ||
268 | [Test] | 277 | [Test] |
@@ -287,6 +296,16 @@ namespace OpenSim.Data.Tests | |||
287 | Assert.That(CompareTerrain(t1, baseterrain2), Is.True); | 296 | Assert.That(CompareTerrain(t1, baseterrain2), Is.True); |
288 | } | 297 | } |
289 | 298 | ||
299 | [Test] | ||
300 | public void T400_EmptyLand() | ||
301 | { | ||
302 | Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0)); | ||
303 | Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0)); | ||
304 | Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0)); | ||
305 | Assert.That(db.LoadLandObjects(UUID.Random()).Count, Is.EqualTo(0)); | ||
306 | } | ||
307 | |||
308 | |||
290 | // Extra private methods | 309 | // Extra private methods |
291 | 310 | ||
292 | private double[,] GenTerrain(double value) | 311 | private double[,] GenTerrain(double value) |