parent
7e35e4c816
commit
b7454b1a2b
|
@ -40,6 +40,7 @@ namespace OpenSim.Data.Tests
|
||||||
public class BasicRegionTest
|
public class BasicRegionTest
|
||||||
{
|
{
|
||||||
public IRegionDataStore db;
|
public IRegionDataStore db;
|
||||||
|
public UUID zero = UUID.Zero;
|
||||||
public UUID region1;
|
public UUID region1;
|
||||||
public UUID region2;
|
public UUID region2;
|
||||||
public UUID prim1;
|
public UUID prim1;
|
||||||
|
@ -168,9 +169,9 @@ namespace OpenSim.Data.Tests
|
||||||
public void T021_PrimInventoryStore()
|
public void T021_PrimInventoryStore()
|
||||||
{
|
{
|
||||||
SceneObjectGroup sog = FindSOG("object1", region1);
|
SceneObjectGroup sog = FindSOG("object1", region1);
|
||||||
InventoryItemBase i = NewItem(item1, UUID.Zero, UUID.Zero, itemname1, UUID.Zero);
|
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
|
||||||
|
|
||||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, UUID.Zero), Is.True);
|
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
|
||||||
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
||||||
Assert.That(t.Name, Is.EqualTo(itemname1));
|
Assert.That(t.Name, Is.EqualTo(itemname1));
|
||||||
|
|
||||||
|
@ -255,7 +256,10 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T300_NoTerrain()
|
public void T300_NoTerrain()
|
||||||
{
|
{
|
||||||
db.LoadTerrain(region1);
|
Assert.That(db.LoadTerrain(zero), Is.Null);
|
||||||
|
Assert.That(db.LoadTerrain(region1), Is.Null);
|
||||||
|
Assert.That(db.LoadTerrain(region2), Is.Null);
|
||||||
|
Assert.That(db.LoadTerrain(UUID.Random()), Is.Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -263,6 +267,11 @@ namespace OpenSim.Data.Tests
|
||||||
{
|
{
|
||||||
double[,] t1 = GenTerrain(height1);
|
double[,] t1 = GenTerrain(height1);
|
||||||
db.StoreTerrain(t1, region1);
|
db.StoreTerrain(t1, region1);
|
||||||
|
|
||||||
|
Assert.That(db.LoadTerrain(zero), Is.Null);
|
||||||
|
Assert.That(db.LoadTerrain(region1), Is.Not.Null);
|
||||||
|
Assert.That(db.LoadTerrain(region2), Is.Null);
|
||||||
|
Assert.That(db.LoadTerrain(UUID.Random()), Is.Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -287,6 +296,16 @@ namespace OpenSim.Data.Tests
|
||||||
Assert.That(CompareTerrain(t1, baseterrain2), Is.True);
|
Assert.That(CompareTerrain(t1, baseterrain2), Is.True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void T400_EmptyLand()
|
||||||
|
{
|
||||||
|
Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0));
|
||||||
|
Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0));
|
||||||
|
Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0));
|
||||||
|
Assert.That(db.LoadLandObjects(UUID.Random()).Count, Is.EqualTo(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Extra private methods
|
// Extra private methods
|
||||||
|
|
||||||
private double[,] GenTerrain(double value)
|
private double[,] GenTerrain(double value)
|
||||||
|
|
Loading…
Reference in New Issue