Add current method output to all persistence level tests so that we can track where we are in the test suite
parent
9885f68f44
commit
48c62eb51b
|
@ -32,6 +32,7 @@ using NUnit.Framework;
|
||||||
using NUnit.Framework.Constraints;
|
using NUnit.Framework.Constraints;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
using System.Data.Common;
|
using System.Data.Common;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
|
@ -105,6 +106,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T001_LoadEmpty()
|
public void T001_LoadEmpty()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(m_db.ExistsAsset(uuid1), Is.False);
|
Assert.That(m_db.ExistsAsset(uuid1), Is.False);
|
||||||
Assert.That(m_db.ExistsAsset(uuid2), Is.False);
|
Assert.That(m_db.ExistsAsset(uuid2), Is.False);
|
||||||
Assert.That(m_db.ExistsAsset(uuid3), Is.False);
|
Assert.That(m_db.ExistsAsset(uuid3), Is.False);
|
||||||
|
@ -113,6 +116,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T010_StoreReadVerifyAssets()
|
public void T010_StoreReadVerifyAssets()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString());
|
AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString());
|
||||||
AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString());
|
AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString());
|
||||||
AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString());
|
AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString());
|
||||||
|
@ -178,6 +183,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T020_CheckForWeirdCreatorID()
|
public void T020_CheckForWeirdCreatorID()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// It is expected that eventually the CreatorID might be an arbitrary string (an URI)
|
// It is expected that eventually the CreatorID might be an arbitrary string (an URI)
|
||||||
// rather than a valid UUID (?). This test is to make sure that the database layer does not
|
// rather than a valid UUID (?). This test is to make sure that the database layer does not
|
||||||
// attempt to convert CreatorID to GUID, but just passes it both ways as a string.
|
// attempt to convert CreatorID to GUID, but just passes it both ways as a string.
|
||||||
|
|
|
@ -31,6 +31,7 @@ using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@ -106,6 +107,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T010_EstateSettingsSimpleStorage_MinimumParameterSet()
|
public void T010_EstateSettingsSimpleStorage_MinimumParameterSet()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
EstateSettingsSimpleStorage(
|
EstateSettingsSimpleStorage(
|
||||||
REGION_ID,
|
REGION_ID,
|
||||||
DataTestUtil.STRING_MIN,
|
DataTestUtil.STRING_MIN,
|
||||||
|
@ -137,6 +140,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T011_EstateSettingsSimpleStorage_MaximumParameterSet()
|
public void T011_EstateSettingsSimpleStorage_MaximumParameterSet()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
EstateSettingsSimpleStorage(
|
EstateSettingsSimpleStorage(
|
||||||
REGION_ID,
|
REGION_ID,
|
||||||
DataTestUtil.STRING_MAX(64),
|
DataTestUtil.STRING_MAX(64),
|
||||||
|
@ -168,6 +173,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T012_EstateSettingsSimpleStorage_AccurateParameterSet()
|
public void T012_EstateSettingsSimpleStorage_AccurateParameterSet()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
EstateSettingsSimpleStorage(
|
EstateSettingsSimpleStorage(
|
||||||
REGION_ID,
|
REGION_ID,
|
||||||
DataTestUtil.STRING_MAX(1),
|
DataTestUtil.STRING_MAX(1),
|
||||||
|
@ -199,6 +206,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T012_EstateSettingsRandomStorage()
|
public void T012_EstateSettingsRandomStorage()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Letting estate store generate rows to database for us
|
// Letting estate store generate rows to database for us
|
||||||
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
||||||
new PropertyScrambler<EstateSettings>()
|
new PropertyScrambler<EstateSettings>()
|
||||||
|
@ -218,6 +227,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T020_EstateSettingsManagerList()
|
public void T020_EstateSettingsManagerList()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Letting estate store generate rows to database for us
|
// Letting estate store generate rows to database for us
|
||||||
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
||||||
|
|
||||||
|
@ -237,6 +248,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T021_EstateSettingsUserList()
|
public void T021_EstateSettingsUserList()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Letting estate store generate rows to database for us
|
// Letting estate store generate rows to database for us
|
||||||
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
||||||
|
|
||||||
|
@ -256,6 +269,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T022_EstateSettingsGroupList()
|
public void T022_EstateSettingsGroupList()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Letting estate store generate rows to database for us
|
// Letting estate store generate rows to database for us
|
||||||
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
||||||
|
|
||||||
|
@ -275,6 +290,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T022_EstateSettingsBanList()
|
public void T022_EstateSettingsBanList()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Letting estate store generate rows to database for us
|
// Letting estate store generate rows to database for us
|
||||||
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ using log4net.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Data.Common;
|
using System.Data.Common;
|
||||||
|
@ -113,6 +114,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T001_LoadEmpty()
|
public void T001_LoadEmpty()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(db.getInventoryFolder(zero), Is.Null);
|
Assert.That(db.getInventoryFolder(zero), Is.Null);
|
||||||
Assert.That(db.getInventoryFolder(folder1), Is.Null);
|
Assert.That(db.getInventoryFolder(folder1), Is.Null);
|
||||||
Assert.That(db.getInventoryFolder(folder2), Is.Null);
|
Assert.That(db.getInventoryFolder(folder2), Is.Null);
|
||||||
|
@ -131,6 +134,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T010_FolderNonParent()
|
public void T010_FolderNonParent()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
|
InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
|
||||||
// the folder will go in
|
// the folder will go in
|
||||||
db.addInventoryFolder(f1);
|
db.addInventoryFolder(f1);
|
||||||
|
@ -141,6 +146,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T011_FolderCreate()
|
public void T011_FolderCreate()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
|
InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
|
||||||
// TODO: this is probably wrong behavior, but is what we have
|
// TODO: this is probably wrong behavior, but is what we have
|
||||||
// db.updateInventoryFolder(f1);
|
// db.updateInventoryFolder(f1);
|
||||||
|
@ -164,6 +171,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T012_FolderList()
|
public void T012_FolderList()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
|
InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
|
||||||
db.addInventoryFolder(f2);
|
db.addInventoryFolder(f2);
|
||||||
|
|
||||||
|
@ -178,6 +187,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T013_FolderHierarchy()
|
public void T013_FolderHierarchy()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
|
int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
|
||||||
Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
|
Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
|
||||||
n = db.getFolderHierarchy(folder1).Count;
|
n = db.getFolderHierarchy(folder1).Count;
|
||||||
|
@ -191,6 +202,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T014_MoveFolder()
|
public void T014_MoveFolder()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryFolderBase f2 = db.getInventoryFolder(folder2);
|
InventoryFolderBase f2 = db.getInventoryFolder(folder2);
|
||||||
f2.ParentID = folder3;
|
f2.ParentID = folder3;
|
||||||
db.moveInventoryFolder(f2);
|
db.moveInventoryFolder(f2);
|
||||||
|
@ -205,6 +218,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T015_FolderHierarchy()
|
public void T015_FolderHierarchy()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
|
Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
|
||||||
Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
|
Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
|
||||||
Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))");
|
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
|
||||||
[Test]
|
[Test]
|
||||||
public void T100_NoItems()
|
public void T100_NoItems()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
|
Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
|
||||||
Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
|
Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
|
||||||
Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))");
|
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
|
||||||
[Test]
|
[Test]
|
||||||
public void T101_CreatItems()
|
public void T101_CreatItems()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
|
db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
|
||||||
db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
|
db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
|
||||||
db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3));
|
db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3));
|
||||||
|
@ -237,6 +256,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T102_CompareItems()
|
public void T102_CompareItems()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryItemBase i1 = db.getInventoryItem(item1);
|
InventoryItemBase i1 = db.getInventoryItem(item1);
|
||||||
InventoryItemBase i2 = db.getInventoryItem(item2);
|
InventoryItemBase i2 = db.getInventoryItem(item2);
|
||||||
InventoryItemBase i3 = db.getInventoryItem(item3);
|
InventoryItemBase i3 = db.getInventoryItem(item3);
|
||||||
|
@ -254,6 +275,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T103_UpdateItem()
|
public void T103_UpdateItem()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// TODO: probably shouldn't have the ability to have an
|
// TODO: probably shouldn't have the ability to have an
|
||||||
// owner of an item in a folder not owned by the user
|
// owner of an item in a folder not owned by the user
|
||||||
|
|
||||||
|
@ -272,6 +295,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T104_RandomUpdateItem()
|
public void T104_RandomUpdateItem()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
PropertyScrambler<InventoryFolderBase> folderScrambler =
|
PropertyScrambler<InventoryFolderBase> folderScrambler =
|
||||||
new PropertyScrambler<InventoryFolderBase>()
|
new PropertyScrambler<InventoryFolderBase>()
|
||||||
.DontScramble(x => x.Owner)
|
.DontScramble(x => x.Owner)
|
||||||
|
@ -329,6 +354,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T999_StillNull()
|
public void T999_StillNull()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// After all tests are run, these should still return no results
|
// After all tests are run, these should still return no results
|
||||||
Assert.That(db.getInventoryFolder(zero), Is.Null);
|
Assert.That(db.getInventoryFolder(zero), Is.Null);
|
||||||
Assert.That(db.getInventoryItem(zero), Is.Null);
|
Assert.That(db.getInventoryItem(zero), Is.Null);
|
||||||
|
|
|
@ -35,6 +35,7 @@ using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Data.Common;
|
using System.Data.Common;
|
||||||
|
@ -120,15 +121,18 @@ namespace OpenSim.Data.Tests
|
||||||
string[] reg_tables = new string[] {
|
string[] reg_tables = new string[] {
|
||||||
"prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings"
|
"prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (m_rebuildDB)
|
if (m_rebuildDB)
|
||||||
{
|
{
|
||||||
DropTables(reg_tables);
|
DropTables(reg_tables);
|
||||||
ResetMigrations("RegionStore");
|
ResetMigrations("RegionStore");
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ClearTables(reg_tables);
|
ClearTables(reg_tables);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Test Plan
|
// Test Plan
|
||||||
// Prims
|
// Prims
|
||||||
// - empty test - 001
|
// - empty test - 001
|
||||||
|
@ -147,6 +151,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T001_LoadEmpty()
|
public void T001_LoadEmpty()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
List<SceneObjectGroup> objs = db.LoadObjects(region1);
|
List<SceneObjectGroup> objs = db.LoadObjects(region1);
|
||||||
List<SceneObjectGroup> objs3 = db.LoadObjects(region3);
|
List<SceneObjectGroup> objs3 = db.LoadObjects(region3);
|
||||||
List<LandData> land = db.LoadLandObjects(region1);
|
List<LandData> land = db.LoadLandObjects(region1);
|
||||||
|
@ -163,6 +169,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T010_StoreSimpleObject()
|
public void T010_StoreSimpleObject()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
SceneObjectGroup sog = NewSOG("object1", prim1, region1);
|
SceneObjectGroup sog = NewSOG("object1", prim1, region1);
|
||||||
SceneObjectGroup sog2 = NewSOG("object2", prim2, region1);
|
SceneObjectGroup sog2 = NewSOG("object2", prim2, region1);
|
||||||
|
|
||||||
|
@ -196,6 +204,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T011_ObjectNames()
|
public void T011_ObjectNames()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
List<SceneObjectGroup> objs = db.LoadObjects(region1);
|
List<SceneObjectGroup> objs = db.LoadObjects(region1);
|
||||||
foreach (SceneObjectGroup sog in objs)
|
foreach (SceneObjectGroup sog in objs)
|
||||||
{
|
{
|
||||||
|
@ -208,6 +218,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T012_SceneParts()
|
public void T012_SceneParts()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
UUID tmp0 = UUID.Random();
|
UUID tmp0 = UUID.Random();
|
||||||
UUID tmp1 = UUID.Random();
|
UUID tmp1 = UUID.Random();
|
||||||
UUID tmp2 = UUID.Random();
|
UUID tmp2 = UUID.Random();
|
||||||
|
@ -241,6 +253,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T013_DatabasePersistency()
|
public void T013_DatabasePersistency()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
// Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data
|
// Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data
|
||||||
// The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored
|
// The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored
|
||||||
// The ObjectFlags is an exception, if it is entered incorrectly, the object IS REJECTED on the database silently.
|
// 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
|
||||||
[Test]
|
[Test]
|
||||||
public void T014_UpdateObject()
|
public void T014_UpdateObject()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
string text1 = "object1 text";
|
string text1 = "object1 text";
|
||||||
SceneObjectGroup sog = FindSOG("object1", region1);
|
SceneObjectGroup sog = FindSOG("object1", region1);
|
||||||
sog.RootPart.Text = text1;
|
sog.RootPart.Text = text1;
|
||||||
|
@ -521,6 +537,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T015_LargeSceneObjects()
|
public void T015_LargeSceneObjects()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
UUID id = UUID.Random();
|
UUID id = UUID.Random();
|
||||||
Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>();
|
Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>();
|
||||||
SceneObjectGroup sog = NewSOG("Test SOG", id, region4);
|
SceneObjectGroup sog = NewSOG("Test SOG", id, region4);
|
||||||
|
@ -565,6 +583,8 @@ namespace OpenSim.Data.Tests
|
||||||
//[Test]
|
//[Test]
|
||||||
public void T016_RandomSogWithSceneParts()
|
public void T016_RandomSogWithSceneParts()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
PropertyScrambler<SceneObjectPart> scrambler =
|
PropertyScrambler<SceneObjectPart> scrambler =
|
||||||
new PropertyScrambler<SceneObjectPart>()
|
new PropertyScrambler<SceneObjectPart>()
|
||||||
.DontScramble(x => x.UUID);
|
.DontScramble(x => x.UUID);
|
||||||
|
@ -631,7 +651,6 @@ namespace OpenSim.Data.Tests
|
||||||
return sog;
|
return sog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// NOTE: it is a bad practice to rely on some of the previous tests having been run before.
|
// NOTE: it is a bad practice to rely on some of the previous tests having been run before.
|
||||||
// If the tests are run manually, one at a time, each starts with full class init (DB cleared).
|
// If the tests are run manually, one at a time, each starts with full class init (DB cleared).
|
||||||
// Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order.
|
// Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order.
|
||||||
|
@ -640,6 +659,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T020_PrimInventoryEmpty()
|
public void T020_PrimInventoryEmpty()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
SceneObjectGroup sog = GetMySOG("object1");
|
SceneObjectGroup sog = GetMySOG("object1");
|
||||||
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
||||||
Assert.That(t, Is.Null);
|
Assert.That(t, Is.Null);
|
||||||
|
@ -659,10 +680,11 @@ namespace OpenSim.Data.Tests
|
||||||
db.StorePrimInventory(sog.RootPart.UUID, list);
|
db.StorePrimInventory(sog.RootPart.UUID, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void T021_PrimInventoryBasic()
|
public void T021_PrimInventoryBasic()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
SceneObjectGroup sog = GetMySOG("object1");
|
SceneObjectGroup sog = GetMySOG("object1");
|
||||||
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
|
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
|
||||||
|
|
||||||
|
@ -690,20 +712,19 @@ namespace OpenSim.Data.Tests
|
||||||
Assert.That(t2.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))");
|
Assert.That(t2.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))");
|
||||||
|
|
||||||
// Removing inventory
|
// Removing inventory
|
||||||
|
|
||||||
List<TaskInventoryItem> list = new List<TaskInventoryItem>();
|
List<TaskInventoryItem> list = new List<TaskInventoryItem>();
|
||||||
db.StorePrimInventory(prim1, list);
|
db.StorePrimInventory(prim1, list);
|
||||||
|
|
||||||
sog = FindSOG("object1", region1);
|
sog = FindSOG("object1", region1);
|
||||||
t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
||||||
Assert.That(t, Is.Null);
|
Assert.That(t, Is.Null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void T025_PrimInventoryPersistency()
|
public void T025_PrimInventoryPersistency()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
InventoryItemBase i = new InventoryItemBase();
|
InventoryItemBase i = new InventoryItemBase();
|
||||||
UUID id = UUID.Random();
|
UUID id = UUID.Random();
|
||||||
i.ID = id;
|
i.ID = id;
|
||||||
|
@ -775,6 +796,8 @@ namespace OpenSim.Data.Tests
|
||||||
[ExpectedException(typeof(ArgumentException))]
|
[ExpectedException(typeof(ArgumentException))]
|
||||||
public void T026_PrimInventoryMany()
|
public void T026_PrimInventoryMany()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
UUID i1,i2,i3,i4;
|
UUID i1,i2,i3,i4;
|
||||||
i1 = UUID.Random();
|
i1 = UUID.Random();
|
||||||
i2 = UUID.Random();
|
i2 = UUID.Random();
|
||||||
|
@ -805,15 +828,18 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T052_RemoveObject()
|
public void T052_RemoveObject()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
db.RemoveObject(prim1, region1);
|
db.RemoveObject(prim1, region1);
|
||||||
SceneObjectGroup sog = FindSOG("object1", region1);
|
SceneObjectGroup sog = FindSOG("object1", region1);
|
||||||
Assert.That(sog, Is.Null);
|
Assert.That(sog, Is.Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void T100_DefaultRegionInfo()
|
public void T100_DefaultRegionInfo()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
RegionSettings r1 = db.LoadRegionSettings(region1);
|
RegionSettings r1 = db.LoadRegionSettings(region1);
|
||||||
Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))");
|
Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))");
|
||||||
|
|
||||||
|
@ -824,6 +850,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T101_UpdateRegionInfo()
|
public void T101_UpdateRegionInfo()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
int agentlimit = random.Next();
|
int agentlimit = random.Next();
|
||||||
double objectbonus = random.Next();
|
double objectbonus = random.Next();
|
||||||
int maturity = random.Next();
|
int maturity = random.Next();
|
||||||
|
@ -923,12 +951,13 @@ namespace OpenSim.Data.Tests
|
||||||
Assert.That(r1a.FixedSun,Is.True);
|
Assert.That(r1a.FixedSun,Is.True);
|
||||||
Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))");
|
Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))");
|
||||||
Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))");
|
Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void T300_NoTerrain()
|
public void T300_NoTerrain()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(db.LoadTerrain(zero), Is.Null);
|
Assert.That(db.LoadTerrain(zero), Is.Null);
|
||||||
Assert.That(db.LoadTerrain(region1), Is.Null);
|
Assert.That(db.LoadTerrain(region1), Is.Null);
|
||||||
Assert.That(db.LoadTerrain(region2), Is.Null);
|
Assert.That(db.LoadTerrain(region2), Is.Null);
|
||||||
|
@ -938,6 +967,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T301_CreateTerrain()
|
public void T301_CreateTerrain()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
double[,] t1 = GenTerrain(height1);
|
double[,] t1 = GenTerrain(height1);
|
||||||
db.StoreTerrain(t1, region1);
|
db.StoreTerrain(t1, region1);
|
||||||
|
|
||||||
|
@ -950,6 +981,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T302_FetchTerrain()
|
public void T302_FetchTerrain()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
double[,] baseterrain1 = GenTerrain(height1);
|
double[,] baseterrain1 = GenTerrain(height1);
|
||||||
double[,] baseterrain2 = GenTerrain(height2);
|
double[,] baseterrain2 = GenTerrain(height2);
|
||||||
double[,] t1 = db.LoadTerrain(region1);
|
double[,] t1 = db.LoadTerrain(region1);
|
||||||
|
@ -960,6 +993,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T303_UpdateTerrain()
|
public void T303_UpdateTerrain()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
double[,] baseterrain1 = GenTerrain(height1);
|
double[,] baseterrain1 = GenTerrain(height1);
|
||||||
double[,] baseterrain2 = GenTerrain(height2);
|
double[,] baseterrain2 = GenTerrain(height2);
|
||||||
db.StoreTerrain(baseterrain2, region1);
|
db.StoreTerrain(baseterrain2, region1);
|
||||||
|
@ -972,6 +1007,8 @@ namespace OpenSim.Data.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void T400_EmptyLand()
|
public void T400_EmptyLand()
|
||||||
{
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
|
||||||
Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))");
|
Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))");
|
||||||
Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))");
|
Assert.That(db.LoadLandObjects(region1).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(region2).Count, Is.EqualTo(0))");
|
Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0))");
|
||||||
|
|
Loading…
Reference in New Issue