29 using NUnit.Framework;
31 using OpenSim.Framework;
32 using OpenSim.Region.Framework.Scenes;
33 using OpenSim.Tests.Common;
42 TestHelpers.InMethod();
45 UUID userId = TestHelpers.ParseTail(0x1);
49 SceneHelpers.SetupSceneModules(scene, lmm);
52 lo.LandData.Name =
"lo1";
55 lo = lmm.AddLandObject(lo);
64 lo2.LandData.Name =
"lo2";
65 lo2 = lmm.AddLandObject(lo2);
69 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID));
70 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID));
75 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID));
76 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID));
86 TestHelpers.InMethod();
91 Scene scene = sh.SetupScene();
92 SceneHelpers.SetupSceneModules(scene, lmm);
94 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
97 Assert.That(loAtCoord1.LandData.LocalID, Is.Not.EqualTo(0));
98 Assert.That(loAtCoord1.LandData.GlobalID, Is.Not.EqualTo(UUID.Zero));
101 Assert.That(loAtCoord2.LandData.LocalID, Is.EqualTo(loAtCoord1.LandData.LocalID));
102 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(loAtCoord1.LandData.GlobalID));
111 TestHelpers.InMethod();
114 UUID userId = TestHelpers.ParseTail(0x1);
118 Scene scene = sh.SetupScene();
119 SceneHelpers.SetupSceneModules(scene, lmm);
122 originalLo1.LandData.Name =
"lo1";
123 originalLo1.SetLandBitmap(
124 originalLo1.GetSquareLandBitmap(0, 0, (int)
Constants.
RegionSize, (
int)Constants.RegionSize / 2));
126 sh.SimDataService.StoreLandObject(originalLo1);
128 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
131 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
132 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
135 Assert.That(loAtCoord2.LandData.LocalID, Is.EqualTo(loAtCoord1.LandData.LocalID));
136 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(loAtCoord1.LandData.GlobalID));
145 TestHelpers.InMethod();
148 UUID userId = TestHelpers.ParseTail(0x1);
152 Scene scene = sh.SetupScene();
153 SceneHelpers.SetupSceneModules(scene, lmm);
156 originalLo1.LandData.Name =
"lo1";
157 originalLo1.SetLandBitmap(
158 originalLo1.GetSquareLandBitmap(0, 0, (int)
Constants.
RegionSize, (
int)Constants.RegionSize / 2));
160 sh.SimDataService.StoreLandObject(originalLo1);
163 originalLo2.LandData.Name =
"lo2";
164 originalLo2.SetLandBitmap(
165 originalLo2.GetSquareLandBitmap(
168 sh.SimDataService.StoreLandObject(originalLo2);
170 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
173 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
174 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
178 Assert.That(loAtCoord2.LandData.Name, Is.EqualTo(originalLo2.LandData.Name));
179 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID));
182 Assert.That(loAtCoord3.LandData.LocalID, Is.Not.EqualTo(loAtCoord1.LandData.LocalID));
183 Assert.That(loAtCoord3.LandData.LocalID, Is.Not.EqualTo(loAtCoord2.LandData.LocalID));
184 Assert.That(loAtCoord3.LandData.GlobalID, Is.Not.EqualTo(loAtCoord1.LandData.GlobalID));
185 Assert.That(loAtCoord3.LandData.GlobalID, Is.Not.EqualTo(loAtCoord2.LandData.GlobalID));
194 TestHelpers.InMethod();
197 UUID userId = TestHelpers.ParseTail(0x1);
201 Scene scene = sh.SetupScene();
202 SceneHelpers.SetupSceneModules(scene, lmm);
205 originalLo1.LandData.Name =
"lo1";
206 originalLo1.SetLandBitmap(
207 originalLo1.GetSquareLandBitmap(0, 0, (int)
Constants.
RegionSize, (
int)Constants.RegionSize / 2));
209 sh.SimDataService.StoreLandObject(originalLo1);
212 originalLo2.LandData.Name =
"lo2";
213 originalLo2.SetLandBitmap(
216 sh.SimDataService.StoreLandObject(originalLo2);
218 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
222 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
223 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
228 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo2.LandData.Name));
229 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID));
236 TestHelpers.InMethod();
239 UUID userId = TestHelpers.ParseTail(0x1);
243 SceneHelpers.SetupSceneModules(scene, lmm);
246 lo.LandData.Name =
"lo1";
249 lo = lmm.AddLandObject(lo);
251 lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId);
255 Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID));
256 Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID));
260 ILandObject loAtCoord = lmm.GetLandObject(LandManagementModule.LandUnit, LandManagementModule.LandUnit);
261 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID));
262 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID));
void TestLoadWithSinglePartialCoveringParcel()
Test parcels on region when a single parcel already exists but it does not cover the whole region...
void TestLoad()
Test parcels on region when whole region is parcelled (which should normally always be the case)...
void TestLoadWithNoParcels()
Test parcels on region when no land data exists to be loaded.
Keeps track of a specific piece of land's information
Helpers for setting up scenes.
void TestLoadWithMultiplePartialCoveringParcels()
Test parcels on region when a single parcel already exists but it does not cover the whole region...
Interactive OpenSim region server