Fixed Presence unit test. Removed unnecessary packing/unpacking of obsolete fields.

slimupdates2
Diva Canto 2010-05-07 21:56:14 -07:00
parent 15562017f2
commit bfb7a49990
2 changed files with 1 additions and 9 deletions

View File

@ -90,7 +90,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
PresenceInfo result = m_LocalConnector.GetAgent(session1);
Assert.IsNotNull(result, "Retrieved GetAgent is null");
Assert.That(result.UserID, Is.EqualTo(user1), "Retrieved userID does not match");
Assert.IsTrue(result.Online, "Agent just logged in but is offline");
UUID region1 = UUID.Random();
bool r = m_LocalConnector.ReportAgent(session1, region1);
@ -107,8 +106,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
r = m_LocalConnector.LogoutAgent(session1);
Assert.IsTrue(r, "LogoutAgent returned false");
result = m_LocalConnector.GetAgent(session1);
Assert.IsNotNull(result, "Agent session disappeared from storage after logout");
Assert.IsFalse(result.Online, "Agent is reported to be Online after logout");
Assert.IsNull(result, "Agent session is still stored after logout");
r = m_LocalConnector.ReportAgent(session1, region1);
Assert.IsFalse(r, "ReportAgent of non-logged in user returned true");

View File

@ -55,10 +55,6 @@ namespace OpenSim.Services.Interfaces
UserID = kvp["UserID"].ToString();
if (kvp.ContainsKey("RegionID"))
UUID.TryParse(kvp["RegionID"].ToString(), out RegionID);
if (kvp.ContainsKey("lookAt"))
Vector3.TryParse(kvp["lookAt"].ToString(), out LookAt);
if (kvp.ContainsKey("position"))
Vector3.TryParse(kvp["position"].ToString(), out Position);
}
public Dictionary<string, object> ToKeyValuePairs()
@ -66,8 +62,6 @@ namespace OpenSim.Services.Interfaces
Dictionary<string, object> result = new Dictionary<string, object>();
result["UserID"] = UserID;
result["RegionID"] = RegionID.ToString();
result["position"] = Position.ToString();
result["lookAt"] = LookAt.ToString();
return result;
}