Add basic regression test for creating a var region
parent
2227f51b29
commit
9664273df6
|
@ -59,6 +59,21 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
new SceneHelpers().SetupScene();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCreateVarScene()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
UUID regionUuid = TestHelpers.ParseTail(0x1);
|
||||
uint sizeX = 512;
|
||||
uint sizeY = 512;
|
||||
|
||||
Scene scene
|
||||
= new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource());
|
||||
|
||||
Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX);
|
||||
Assert.AreEqual(sizeY, scene.RegionInfo.RegionSizeY);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Very basic scene update test. Should become more elaborate with time.
|
||||
/// </summary>
|
||||
|
|
|
@ -119,6 +119,11 @@ namespace OpenSim.Tests.Common
|
|||
return SetupScene(name, id, x, y, new IniConfigSource());
|
||||
}
|
||||
|
||||
public TestScene SetupScene(string name, UUID id, uint x, uint y, IConfigSource configSource)
|
||||
{
|
||||
return SetupScene(name, id, x, y, Constants.RegionSize, Constants.RegionSize, configSource);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up a scene.
|
||||
/// </summary>
|
||||
|
@ -126,10 +131,12 @@ namespace OpenSim.Tests.Common
|
|||
/// <param name="id">ID of the region</param>
|
||||
/// <param name="x">X co-ordinate of the region</param>
|
||||
/// <param name="y">Y co-ordinate of the region</param>
|
||||
/// <param name="sizeX">X size of scene</param>
|
||||
/// <param name="sizeY">Y size of scene</param>
|
||||
/// <param name="configSource"></param>
|
||||
/// <returns></returns>
|
||||
public TestScene SetupScene(
|
||||
string name, UUID id, uint x, uint y, IConfigSource configSource)
|
||||
string name, UUID id, uint x, uint y, uint sizeX, uint sizeY, IConfigSource configSource)
|
||||
{
|
||||
Console.WriteLine("Setting up test scene {0}", name);
|
||||
|
||||
|
@ -139,6 +146,8 @@ namespace OpenSim.Tests.Common
|
|||
RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
|
||||
regInfo.RegionName = name;
|
||||
regInfo.RegionID = id;
|
||||
regInfo.RegionSizeX = sizeX;
|
||||
regInfo.RegionSizeY = sizeY;
|
||||
|
||||
SceneCommunicationService scs = new SceneCommunicationService();
|
||||
|
||||
|
|
Loading…
Reference in New Issue