28 using NUnit.Framework;
29 using OpenSim.Tests.Common;
31 namespace OpenSim.Framework.Tests
44 Assert.That(TestLocation1 == TestLocation2);
46 TestLocation1 =
new Location(1099511628032001);
47 TestLocation2 =
new Location(1099511628032000);
48 Assert.That(TestLocation1 != TestLocation2);
56 Assert.That(TestLocation1 == TestLocation2);
58 Assert.That(TestLocation1.X == 255000 && TestLocation1.Y == 256000,
"Test xy location doesn't match position in the constructor");
59 Assert.That(TestLocation2.X == 255000 && TestLocation2.Y == 256000,
"Test xy location doesn't match regionhandle provided");
61 Assert.That(TestLocation2.RegionHandle == 1095216660736000,
62 "Location RegionHandle Property didn't match regionhandle provided in constructor");
64 ulong RegionHandle = TestLocation1.RegionHandle;
65 Assert.That(RegionHandle.Equals(1095216660736000),
"Equals(regionhandle) failed to match the position in the constructor");
67 TestLocation2 =
new Location(RegionHandle);
68 Assert.That(TestLocation2.Equals(255000, 256000),
"Decoded regionhandle failed to match the original position in the constructor");
71 TestLocation1 =
new Location(255001, 256001);
72 TestLocation2 =
new Location(1095216660736000);
73 Assert.That(TestLocation1 != TestLocation2);
75 Assert.That(TestLocation1.Equals(255001, 256001),
"Equals(x,y) failed to match the position in the constructor");
77 Assert.That(TestLocation2.GetHashCode() == (TestLocation2.
X.GetHashCode() ^ TestLocation2.Y.GetHashCode()),
"GetHashCode failed to produce the expected hashcode");
80 object cln = TestLocation2.Clone();
82 Assert.That(TestLocation3.X == TestLocation2.X && TestLocation3.Y == TestLocation2.Y,
83 "Cloned Location values do not match");
85 Assert.That(TestLocation2.Equals(cln),
"Cloned object failed .Equals(obj) Test");
void locationRegionHandleRegionHandle()
void locationXYRegionHandle()