Fixed Presence unit test. Removed unnecessary packing/unpacking of obsolete fields.
parent
15562017f2
commit
bfb7a49990
|
@ -90,7 +90,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
|
||||||
PresenceInfo result = m_LocalConnector.GetAgent(session1);
|
PresenceInfo result = m_LocalConnector.GetAgent(session1);
|
||||||
Assert.IsNotNull(result, "Retrieved GetAgent is null");
|
Assert.IsNotNull(result, "Retrieved GetAgent is null");
|
||||||
Assert.That(result.UserID, Is.EqualTo(user1), "Retrieved userID does not match");
|
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();
|
UUID region1 = UUID.Random();
|
||||||
bool r = m_LocalConnector.ReportAgent(session1, region1);
|
bool r = m_LocalConnector.ReportAgent(session1, region1);
|
||||||
|
@ -107,8 +106,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
|
||||||
r = m_LocalConnector.LogoutAgent(session1);
|
r = m_LocalConnector.LogoutAgent(session1);
|
||||||
Assert.IsTrue(r, "LogoutAgent returned false");
|
Assert.IsTrue(r, "LogoutAgent returned false");
|
||||||
result = m_LocalConnector.GetAgent(session1);
|
result = m_LocalConnector.GetAgent(session1);
|
||||||
Assert.IsNotNull(result, "Agent session disappeared from storage after logout");
|
Assert.IsNull(result, "Agent session is still stored after logout");
|
||||||
Assert.IsFalse(result.Online, "Agent is reported to be Online after logout");
|
|
||||||
|
|
||||||
r = m_LocalConnector.ReportAgent(session1, region1);
|
r = m_LocalConnector.ReportAgent(session1, region1);
|
||||||
Assert.IsFalse(r, "ReportAgent of non-logged in user returned true");
|
Assert.IsFalse(r, "ReportAgent of non-logged in user returned true");
|
||||||
|
|
|
@ -55,10 +55,6 @@ namespace OpenSim.Services.Interfaces
|
||||||
UserID = kvp["UserID"].ToString();
|
UserID = kvp["UserID"].ToString();
|
||||||
if (kvp.ContainsKey("RegionID"))
|
if (kvp.ContainsKey("RegionID"))
|
||||||
UUID.TryParse(kvp["RegionID"].ToString(), out 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()
|
public Dictionary<string, object> ToKeyValuePairs()
|
||||||
|
@ -66,8 +62,6 @@ namespace OpenSim.Services.Interfaces
|
||||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
result["UserID"] = UserID;
|
result["UserID"] = UserID;
|
||||||
result["RegionID"] = RegionID.ToString();
|
result["RegionID"] = RegionID.ToString();
|
||||||
result["position"] = Position.ToString();
|
|
||||||
result["lookAt"] = LookAt.ToString();
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue