From 2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7 Mon Sep 17 00:00:00 2001 From: dr scofield (aka dirk husemann) Date: Fri, 2 Oct 2009 11:10:52 +0200 Subject: - cleaning up LandData/ILandObject capitalization issues - adding LandDataSerializer to OAR mechanics --- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 53f24d9..952fac9 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -127,7 +127,7 @@ namespace OpenSim.Tests.Common.Setup public static TestScene SetupScene( string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) { - bool newScene= false; + bool newScene = false; Console.WriteLine("Setting up test scene {0}", name); -- cgit v1.1 From 3c271bf2229bc58969ca7d15b7082815f6b4c1f0 Mon Sep 17 00:00:00 2001 From: dr scofield (aka dirk husemann) Date: Fri, 2 Oct 2009 11:26:45 +0200 Subject: fixing TestLandChannel to let it return empty List() (as does the real LandChannel), percolating to SceneSetupHelpers. --- OpenSim/Tests/Common/Mock/TestLandChannel.cs | 46 ++++++++++++++++++++++--- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 +- 2 files changed, 42 insertions(+), 6 deletions(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index 01b5203..ed30827 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs @@ -29,6 +29,8 @@ using System.Collections.Generic; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.CoreModules.World.Land; namespace OpenSim.Tests.Common.Mock { @@ -37,11 +39,45 @@ namespace OpenSim.Tests.Common.Mock /// public class TestLandChannel : ILandChannel { - public List ParcelsNearPoint(Vector3 position) { return null; } - public List AllParcels() { return null; } - public ILandObject GetLandObject(int x, int y) { return null; } - public ILandObject GetLandObject(int localID) { return null; } - public ILandObject GetLandObject(float x, float y) { return null; } + private Scene m_scene; + + public TestLandChannel(Scene scene) + { + m_scene = scene; + } + + public List ParcelsNearPoint(Vector3 position) + { + return new List(); + } + + public List AllParcels() + { + return new List(); + } + + protected ILandObject GetNoLand() + { + ILandObject obj = new LandObject(UUID.Zero, false, m_scene); + obj.LandData.Name = "NO LAND"; + return obj; + } + + public ILandObject GetLandObject(int x, int y) + { + return GetNoLand(); + } + + public ILandObject GetLandObject(int localID) + { + return GetNoLand(); + } + + public ILandObject GetLandObject(float x, float y) + { + return GetNoLand(); + } + public bool IsLandPrimCountTainted() { return false; } public bool IsForcefulBansAllowed() { return false; } public void UpdateLandObject(int localID, LandData data) {} diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 952fac9..eab5422 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -198,7 +198,7 @@ namespace OpenSim.Tests.Common.Setup testScene.SetModuleInterfaces(); - testScene.LandChannel = new TestLandChannel(); + testScene.LandChannel = new TestLandChannel(testScene); testScene.LoadWorldMap(); PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); -- cgit v1.1