29 using System.Collections.Generic;
31 using System.Reflection;
34 using NUnit.Framework;
36 using OpenSim.Framework;
37 using OpenSim.Services.Interfaces;
38 using OpenSim.Services.Connectors;
40 namespace Robust.Tests
50 UUID user1 = UUID.Random();
51 UUID session1 = UUID.Random();
52 UUID region1 = UUID.Random();
54 bool success = m_Connector.LoginAgent(user1.ToString(), session1, UUID.Zero);
55 Assert.AreEqual(success,
true,
"Failed to add user session");
58 Assert.AreNotEqual(pinfo, null,
"Unable to retrieve session");
59 Assert.AreEqual(pinfo.UserID, user1.ToString(),
"Retrieved session does not match expected userID");
60 Assert.AreNotEqual(pinfo.RegionID, region1,
"Retrieved session is unexpectedly in region");
62 success = m_Connector.ReportAgent(session1, region1);
63 Assert.AreEqual(success,
true,
"Failed to report session in region 1");
65 pinfo = m_Connector.GetAgent(session1);
66 Assert.AreNotEqual(pinfo, null,
"Unable to session presence");
67 Assert.AreEqual(pinfo.UserID, user1.ToString(),
"Retrieved session does not match expected userID");
68 Assert.AreEqual(pinfo.RegionID, region1,
"Retrieved session is not in expected region");
70 success = m_Connector.LogoutAgent(session1);
71 Assert.AreEqual(success,
true,
"Failed to remove session");
73 pinfo = m_Connector.GetAgent(session1);
74 Assert.AreEqual(pinfo, null,
"Session is still there, even though it shouldn't");
76 success = m_Connector.ReportAgent(session1, UUID.Random());
77 Assert.AreEqual(success,
false,
"Remove non-existing session should fail");