aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorSean Dague2008-11-18 12:48:29 +0000
committerSean Dague2008-11-18 12:48:29 +0000
commit99fb0d7b33faab00a48be9792234854af93b0913 (patch)
treed55a5855495deec5bac920d6c063262db2a6d6cd /OpenSim/Data
parentApply JHurliman's texture sender patch (diff)
downloadopensim-SC_OLD-99fb0d7b33faab00a48be9792234854af93b0913.zip
opensim-SC_OLD-99fb0d7b33faab00a48be9792234854af93b0913.tar.gz
opensim-SC_OLD-99fb0d7b33faab00a48be9792234854af93b0913.tar.bz2
opensim-SC_OLD-99fb0d7b33faab00a48be9792234854af93b0913.tar.xz
Extended Agent Tests
From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/Tests/BasicUserTest.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs
index e9e61d0..3bc02f7 100644
--- a/OpenSim/Data/Tests/BasicUserTest.cs
+++ b/OpenSim/Data/Tests/BasicUserTest.cs
@@ -431,6 +431,52 @@ namespace OpenSim.Data.Tests
431 } 431 }
432 432
433 [Test] 433 [Test]
434 public void T023_AgentPersistency()
435 {
436 UUID user = user4;
437 UUID agent = agent4;
438 UUID secureagent = UUID.Random();
439 string agentip = RandomName();
440 uint agentport = (uint)random.Next();
441 int logintime = random.Next();
442 int logouttime = random.Next();
443 UUID regionid = UUID.Random();
444 ulong regionhandle = (ulong) random.Next();
445 Vector3 currentpos = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
446 Vector3 currentlookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
447 UUID orgregionid = UUID.Random();
448
449 UserAgentData a = new UserAgentData();
450 a.ProfileID = user;
451 a.SessionID = agent;
452 a.SecureSessionID = secureagent;
453 a.AgentIP = agentip;
454 a.AgentPort = agentport;
455 a.LoginTime = logintime;
456 a.LogoutTime = logouttime;
457 a.Region = regionid;
458 a.Handle = regionhandle;
459 a.Position = currentpos;
460 a.LookAt = currentlookat;
461 a.InitialRegion = orgregionid;
462
463 db.AddNewUserAgent(a);
464
465 UserAgentData a1 = db.GetAgentByUUID(user4);
466 Assert.That(user,Is.EqualTo(a1.ProfileID));
467 Assert.That(agent,Is.EqualTo(a1.SessionID));
468 Assert.That(secureagent,Is.EqualTo(a1.SecureSessionID));
469 Assert.That(agentip,Is.EqualTo(a1.AgentIP));
470 Assert.That(agentport,Is.EqualTo(a1.AgentPort));
471 Assert.That(logintime,Is.EqualTo(a1.LoginTime));
472 Assert.That(logouttime,Is.EqualTo(a1.LogoutTime));
473 Assert.That(regionid,Is.EqualTo(a1.Region));
474 Assert.That(regionhandle,Is.EqualTo(a1.Handle));
475 Assert.That(currentpos,Is.EqualTo(a1.Position));
476 Assert.That(currentlookat,Is.EqualTo(a1.LookAt));
477 }
478
479 [Test]
434 public void T030_CreateFriendList() 480 public void T030_CreateFriendList()
435 { 481 {
436 Dictionary<UUID, uint> perms = new Dictionary<UUID,uint>(); 482 Dictionary<UUID, uint> perms = new Dictionary<UUID,uint>();