diff options
author | dr scofield (aka dirk husemann) | 2009-10-02 11:26:45 +0200 |
---|---|---|
committer | dr scofield (aka dirk husemann) | 2009-10-02 11:31:30 +0200 |
commit | 3c271bf2229bc58969ca7d15b7082815f6b4c1f0 (patch) | |
tree | 0b1897db26de73aec32baab70297898dac7eed0b /OpenSim | |
parent | - cleaning up LandData/ILandObject capitalization issues (diff) | |
download | opensim-SC_OLD-3c271bf2229bc58969ca7d15b7082815f6b4c1f0.zip opensim-SC_OLD-3c271bf2229bc58969ca7d15b7082815f6b4c1f0.tar.gz opensim-SC_OLD-3c271bf2229bc58969ca7d15b7082815f6b4c1f0.tar.bz2 opensim-SC_OLD-3c271bf2229bc58969ca7d15b7082815f6b4c1f0.tar.xz |
fixing TestLandChannel to let it return empty List<ILandObject>() (as
does the real LandChannel), percolating to SceneSetupHelpers.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestLandChannel.cs | 46 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 |
2 files changed, 42 insertions, 6 deletions
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; | |||
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
31 | using OpenSim.Region.Framework.Interfaces; | 31 | using OpenSim.Region.Framework.Interfaces; |
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | using OpenSim.Region.CoreModules.World.Land; | ||
32 | 34 | ||
33 | namespace OpenSim.Tests.Common.Mock | 35 | namespace OpenSim.Tests.Common.Mock |
34 | { | 36 | { |
@@ -37,11 +39,45 @@ namespace OpenSim.Tests.Common.Mock | |||
37 | /// </summary> | 39 | /// </summary> |
38 | public class TestLandChannel : ILandChannel | 40 | public class TestLandChannel : ILandChannel |
39 | { | 41 | { |
40 | public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; } | 42 | private Scene m_scene; |
41 | public List<ILandObject> AllParcels() { return null; } | 43 | |
42 | public ILandObject GetLandObject(int x, int y) { return null; } | 44 | public TestLandChannel(Scene scene) |
43 | public ILandObject GetLandObject(int localID) { return null; } | 45 | { |
44 | public ILandObject GetLandObject(float x, float y) { return null; } | 46 | m_scene = scene; |
47 | } | ||
48 | |||
49 | public List<ILandObject> ParcelsNearPoint(Vector3 position) | ||
50 | { | ||
51 | return new List<ILandObject>(); | ||
52 | } | ||
53 | |||
54 | public List<ILandObject> AllParcels() | ||
55 | { | ||
56 | return new List<ILandObject>(); | ||
57 | } | ||
58 | |||
59 | protected ILandObject GetNoLand() | ||
60 | { | ||
61 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); | ||
62 | obj.LandData.Name = "NO LAND"; | ||
63 | return obj; | ||
64 | } | ||
65 | |||
66 | public ILandObject GetLandObject(int x, int y) | ||
67 | { | ||
68 | return GetNoLand(); | ||
69 | } | ||
70 | |||
71 | public ILandObject GetLandObject(int localID) | ||
72 | { | ||
73 | return GetNoLand(); | ||
74 | } | ||
75 | |||
76 | public ILandObject GetLandObject(float x, float y) | ||
77 | { | ||
78 | return GetNoLand(); | ||
79 | } | ||
80 | |||
45 | public bool IsLandPrimCountTainted() { return false; } | 81 | public bool IsLandPrimCountTainted() { return false; } |
46 | public bool IsForcefulBansAllowed() { return false; } | 82 | public bool IsForcefulBansAllowed() { return false; } |
47 | public void UpdateLandObject(int localID, LandData data) {} | 83 | 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 | |||
198 | 198 | ||
199 | testScene.SetModuleInterfaces(); | 199 | testScene.SetModuleInterfaces(); |
200 | 200 | ||
201 | testScene.LandChannel = new TestLandChannel(); | 201 | testScene.LandChannel = new TestLandChannel(testScene); |
202 | testScene.LoadWorldMap(); | 202 | testScene.LoadWorldMap(); |
203 | 203 | ||
204 | PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); | 204 | PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); |