mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
Formatting cleanup.
This commit is contained in:
@@ -175,7 +175,7 @@ namespace OpenSim.Data.MSSQL
|
||||
(@id, @name, @description, @assetType, @local,
|
||||
@temporary, @create_time, @access_time, @data)";
|
||||
|
||||
string assetName = asset.Name;
|
||||
string assetName = asset.Name;
|
||||
if (asset.Name.Length > 64)
|
||||
{
|
||||
assetName = asset.Name.Substring(0, 64);
|
||||
@@ -223,7 +223,7 @@ namespace OpenSim.Data.MSSQL
|
||||
local = @local, temporary = @temporary, data = @data
|
||||
WHERE id = @keyId;";
|
||||
|
||||
string assetName = asset.Name;
|
||||
string assetName = asset.Name;
|
||||
if (asset.Name.Length > 64)
|
||||
{
|
||||
assetName = asset.Name.Substring(0, 64);
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace OpenSim.Data.MSSQL
|
||||
@inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType,
|
||||
@creationDate, @groupID, @groupOwned, @flags)";
|
||||
|
||||
string itemName = item.Name;
|
||||
string itemName = item.Name;
|
||||
if (item.Name.Length > 64)
|
||||
{
|
||||
itemName = item.Name.Substring(0, 64);
|
||||
@@ -529,7 +529,7 @@ namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
itemDesc = item.Description.Substring(0, 128);
|
||||
m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters on update");
|
||||
}
|
||||
}
|
||||
|
||||
using (AutoClosingSqlCommand command = database.Query(sql))
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace OpenSim.Data.MSSQL
|
||||
sceneObjectPart.Name, sceneObjectPart.UUID, sceneObjectPart.GroupPosition, groupID);
|
||||
|
||||
sceneObjectPart.UUID = groupID;
|
||||
}
|
||||
}
|
||||
|
||||
grp = new SceneObjectGroup(sceneObjectPart);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace OpenSim.Data.MSSQL
|
||||
conn.Open();
|
||||
Migration m = new Migration(conn, GetType().Assembly, "UserStore");
|
||||
m.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<UserAccountData> Query(UUID principalID, UUID scopeID, string query)
|
||||
|
||||
@@ -1146,7 +1146,7 @@ ELSE
|
||||
if (reader.IsDBNull(reader.GetOrdinal("homeRegionID")))
|
||||
retval.HomeRegionID = UUID.Zero;
|
||||
else
|
||||
retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]);
|
||||
retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]);
|
||||
|
||||
retval.Created = Convert.ToInt32(reader["created"].ToString());
|
||||
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
||||
@@ -1200,7 +1200,7 @@ ELSE
|
||||
if (reader.IsDBNull(reader.GetOrdinal("partner")))
|
||||
retval.Partner = UUID.Zero;
|
||||
else
|
||||
retval.Partner = new UUID((Guid)reader["partner"]);
|
||||
retval.Partner = new UUID((Guid)reader["partner"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL
|
||||
"VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)",
|
||||
_dbConnection.Connection);
|
||||
|
||||
string assetName = asset.Name;
|
||||
string assetName = asset.Name;
|
||||
if (asset.Name.Length > 64)
|
||||
{
|
||||
assetName = asset.Name.Substring(0, 64);
|
||||
|
||||
@@ -325,10 +325,10 @@ namespace OpenSim.Data.MySQL
|
||||
UUID GroupID = UUID.Zero;
|
||||
UUID.TryParse((string)reader["avatarID"], out Owner);
|
||||
UUID.TryParse((string)reader["groupID"], out GroupID);
|
||||
item.Owner = Owner;
|
||||
item.Owner = Owner;
|
||||
item.GroupID = GroupID;
|
||||
|
||||
// Rest of the parsing. If these UUID's fail, we're dead anyway
|
||||
// Rest of the parsing. If these UUID's fail, we're dead anyway
|
||||
item.ID = new UUID((string) reader["inventoryID"]);
|
||||
item.AssetID = new UUID((string) reader["assetID"]);
|
||||
item.AssetType = (int) reader["assetType"];
|
||||
@@ -472,7 +472,7 @@ namespace OpenSim.Data.MySQL
|
||||
+ ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
|
||||
+ ", ?groupID, ?groupOwned, ?flags)";
|
||||
|
||||
string itemName = item.Name;
|
||||
string itemName = item.Name;
|
||||
if (item.Name.Length > 64)
|
||||
{
|
||||
itemName = item.Name.Substring(0, 64);
|
||||
@@ -484,7 +484,7 @@ namespace OpenSim.Data.MySQL
|
||||
{
|
||||
itemDesc = item.Description.Substring(0, 128);
|
||||
m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length + " to " + itemDesc.Length + " characters on add item");
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -590,12 +590,12 @@ namespace OpenSim.Data.MySQL
|
||||
"REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) VALUES ";
|
||||
sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
|
||||
|
||||
string folderName = folder.Name;
|
||||
string folderName = folder.Name;
|
||||
if (folderName.Length > 64)
|
||||
{
|
||||
folderName = folderName.Substring(0, 64);
|
||||
m_log.Warn("[INVENTORY DB]: Name field truncated from " + folder.Name.Length + " to " + folderName.Length + " characters on add folder");
|
||||
}
|
||||
}
|
||||
|
||||
database.CheckConnection();
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace OpenSim.Data.MySQL
|
||||
prim.Name, prim.UUID, prim.GroupPosition, groupID);
|
||||
|
||||
prim.UUID = groupID;
|
||||
}
|
||||
}
|
||||
|
||||
grp = new SceneObjectGroup(prim);
|
||||
}
|
||||
@@ -533,7 +533,7 @@ namespace OpenSim.Data.MySQL
|
||||
/// <summary>
|
||||
/// Load in a prim's persisted inventory.
|
||||
/// </summary>
|
||||
/// <param name="prim">The prim</param>
|
||||
/// <param name="prim">The prim</param>
|
||||
private void LoadItems(SceneObjectPart prim)
|
||||
{
|
||||
lock (m_Connection)
|
||||
|
||||
@@ -632,7 +632,7 @@ namespace OpenSim.Data.MySQL
|
||||
UUID zero = UUID.Zero;
|
||||
if (user.ID == zero)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
MySQLSuperManager dbm = GetLockedConnection("AddNewUserProfile");
|
||||
|
||||
@@ -666,7 +666,7 @@ namespace OpenSim.Data.MySQL
|
||||
{
|
||||
UUID zero = UUID.Zero;
|
||||
if (agent.ProfileID == zero || agent.SessionID == zero)
|
||||
return;
|
||||
return;
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("AddNewUserAgent");
|
||||
try
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace OpenSim.Data.NHibernate
|
||||
m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace OpenSim.Data.NHibernate
|
||||
m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid);
|
||||
|
||||
user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
|
||||
if (user != null)
|
||||
if (user != null)
|
||||
{
|
||||
UserAgentData agent = GetAgentByUUID(uuid);
|
||||
if (agent != null)
|
||||
@@ -245,7 +245,7 @@ namespace OpenSim.Data.NHibernate
|
||||
UserProfileData user=GetUserByUUID(agentID);
|
||||
user.WebLoginKey = webLoginKey;
|
||||
UpdateUserProfile(user);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms)
|
||||
@@ -258,7 +258,7 @@ namespace OpenSim.Data.NHibernate
|
||||
{
|
||||
manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms));
|
||||
}
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
private bool FriendRelationExists(UUID ownerId, UUID friendId)
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace OpenSim.Data
|
||||
public uint maturity;
|
||||
|
||||
|
||||
//Data Wrappers
|
||||
//Data Wrappers
|
||||
public string RegionName
|
||||
{
|
||||
get { return regionName; }
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace OpenSim.Data.SQLite
|
||||
{
|
||||
//m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
|
||||
|
||||
DataTable dbItems = ds.Tables["primitems"];
|
||||
DataTable dbItems = ds.Tables["primitems"];
|
||||
String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
|
||||
DataRow[] dbItemRows = dbItems.Select(sql);
|
||||
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests
|
||||
public UUID item2;
|
||||
public UUID item3;
|
||||
|
||||
public static Random random;
|
||||
public static Random random;
|
||||
|
||||
public string itemname1 = "item1";
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
|
||||
UUID tmp0 = UUID.Random();
|
||||
UUID tmp1 = UUID.Random();
|
||||
UUID tmp2 = UUID.Random();
|
||||
UUID tmp3 = UUID.Random();
|
||||
UUID tmp3 = UUID.Random();
|
||||
UUID newregion = UUID.Random();
|
||||
SceneObjectPart p1 = NewSOP("SoP 1",tmp1);
|
||||
SceneObjectPart p2 = NewSOP("SoP 2",tmp2);
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Data.Tests
|
||||
random.NextBytes(partsys);
|
||||
DateTime expires = new DateTime(2008, 12, 20);
|
||||
DateTime rezzed = new DateTime(2009, 07, 15);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -261,7 +261,7 @@ namespace OpenSim.Data.Tests
|
||||
sop.Shape = pbshap;
|
||||
sop.GroupPosition = groupos;
|
||||
sop.RotationOffset = rotoff;
|
||||
sop.CreatorID = creator;
|
||||
sop.CreatorID = creator;
|
||||
sop.InventorySerial = iserial;
|
||||
sop.TaskInventory = dic;
|
||||
sop.ObjectFlags = objf;
|
||||
@@ -306,7 +306,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))");
|
||||
Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))");
|
||||
Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))");
|
||||
Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
|
||||
Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
|
||||
Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))");
|
||||
Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))");
|
||||
Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))");
|
||||
@@ -319,7 +319,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
|
||||
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
|
||||
|
||||
// This is necessary or object will not be inserted in DB
|
||||
// This is necessary or object will not be inserted in DB
|
||||
sop.ObjectFlags = 0;
|
||||
|
||||
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
||||
@@ -332,11 +332,11 @@ namespace OpenSim.Data.Tests
|
||||
// Makes sure there are no double insertions:
|
||||
db.StoreObject(sog,region3);
|
||||
sogs = db.LoadObjects(region3);
|
||||
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
|
||||
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
|
||||
|
||||
|
||||
// Tests if the parameters were inserted correctly
|
||||
SceneObjectPart p = sogs[0].RootPart;
|
||||
SceneObjectPart p = sogs[0].RootPart;
|
||||
Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))");
|
||||
//Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))");
|
||||
Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
|
||||
@@ -402,7 +402,7 @@ namespace OpenSim.Data.Tests
|
||||
random.NextBytes(partsys);
|
||||
DateTime expires = new DateTime(2010, 12, 20);
|
||||
DateTime rezzed = new DateTime(2005, 07, 15);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -418,7 +418,7 @@ namespace OpenSim.Data.Tests
|
||||
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
|
||||
pbshap = PrimitiveBaseShape.Default;
|
||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
byte updatef = (byte) random.Next(127);
|
||||
byte updatef = (byte) random.Next(127);
|
||||
|
||||
// Updates the region with new values
|
||||
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
|
||||
@@ -427,7 +427,7 @@ namespace OpenSim.Data.Tests
|
||||
sog2.RootPart.Shape = pbshap;
|
||||
sog2.RootPart.GroupPosition = groupos;
|
||||
sog2.RootPart.RotationOffset = rotoff;
|
||||
sog2.RootPart.CreatorID = creator;
|
||||
sog2.RootPart.CreatorID = creator;
|
||||
sog2.RootPart.TaskInventory = dic;
|
||||
sog2.RootPart.Name = name;
|
||||
sog2.RootPart.Material = material;
|
||||
@@ -492,7 +492,7 @@ namespace OpenSim.Data.Tests
|
||||
{
|
||||
UUID tmp = UUID.Random();
|
||||
SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -648,7 +648,7 @@ namespace OpenSim.Data.Tests
|
||||
{
|
||||
InventoryItemBase i = new InventoryItemBase();
|
||||
UUID id = UUID.Random();
|
||||
i.ID = id;
|
||||
i.ID = id;
|
||||
UUID folder = UUID.Random();
|
||||
i.Folder = folder;
|
||||
UUID owner = UUID.Random();
|
||||
@@ -666,13 +666,13 @@ namespace OpenSim.Data.Tests
|
||||
i.NextPermissions = nextperm;
|
||||
uint curperm = (uint) random.Next();
|
||||
i.CurrentPermissions = curperm;
|
||||
uint baseperm = (uint) random.Next();
|
||||
uint baseperm = (uint) random.Next();
|
||||
i.BasePermissions = baseperm;
|
||||
uint eoperm = (uint) random.Next();
|
||||
i.EveryOnePermissions = eoperm;
|
||||
int assettype = random.Next();
|
||||
i.AssetType = assettype;
|
||||
UUID groupid = UUID.Random();
|
||||
UUID groupid = UUID.Random();
|
||||
i.GroupID = groupid;
|
||||
bool groupown = true;
|
||||
i.GroupOwned = groupown;
|
||||
@@ -1010,7 +1010,7 @@ namespace OpenSim.Data.Tests
|
||||
|
||||
private SceneObjectPart NewSOP(string name, UUID uuid)
|
||||
{
|
||||
SceneObjectPart sop = new SceneObjectPart();
|
||||
SceneObjectPart sop = new SceneObjectPart();
|
||||
sop.Name = name;
|
||||
sop.Description = name;
|
||||
sop.Text = RandomName();
|
||||
@@ -1042,12 +1042,12 @@ namespace OpenSim.Data.Tests
|
||||
int size = random.Next(5,12);
|
||||
char ch ;
|
||||
for (int i=0; i<size; i++)
|
||||
{
|
||||
{
|
||||
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
|
||||
name.Append(ch);
|
||||
}
|
||||
return name.ToString();
|
||||
}
|
||||
}
|
||||
// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name)
|
||||
// {
|
||||
// InventoryFolderBase f = new InventoryFolderBase();
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Data.Tests
|
||||
u1.FirstName = "Ugly";
|
||||
|
||||
db.UpdateUserProfile(u1);
|
||||
Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
|
||||
Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -174,7 +174,7 @@ namespace OpenSim.Data.Tests
|
||||
db.AddNewUserProfile(u4);
|
||||
Assert.That(db.GetUserByUUID(zero),Is.Null);
|
||||
Assert.That(db.GetUserByUUID(user4),Is.Null);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void T015_UserPersistency()
|
||||
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
|
||||
|
||||
//HomeRegionX and HomeRegionY must only use 24 bits
|
||||
homeregx = ((homeregx << 8) >> 8);
|
||||
homeregy = ((homeregy << 8) >> 8);
|
||||
homeregy = ((homeregy << 8) >> 8);
|
||||
|
||||
u.ID = id;
|
||||
u.WebLoginKey = webloginkey;
|
||||
@@ -299,7 +299,7 @@ namespace OpenSim.Data.Tests
|
||||
uint homeregx = (uint) random.Next();
|
||||
uint homeregy = (uint) random.Next();
|
||||
Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
int created = random.Next();
|
||||
int lastlogin = random.Next();
|
||||
string userinvuri = RandomName();
|
||||
@@ -359,7 +359,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))");
|
||||
Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))");
|
||||
Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))");
|
||||
Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
@@ -426,7 +426,7 @@ namespace OpenSim.Data.Tests
|
||||
UserAgentData a2 = db.GetAgentByName(fname2,lname2);
|
||||
UserAgentData a3 = db.GetAgentByName(name3);
|
||||
Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))");
|
||||
Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
|
||||
Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -501,11 +501,11 @@ namespace OpenSim.Data.Tests
|
||||
db.AddNewUserFriend(user1,user3, 2);
|
||||
db.AddNewUserFriend(user1,user2, 4);
|
||||
List<FriendListItem> fl1 = db.GetUserFriendList(user1);
|
||||
Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
|
||||
Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
|
||||
perms.Add(user2,1);
|
||||
perms.Add(user3,2);
|
||||
for (int i = 0; i < fl1.Count; i++)
|
||||
{
|
||||
{
|
||||
Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))");
|
||||
friends.Add(fl1[i].Friend,1);
|
||||
temp = perms[fl1[i].Friend];
|
||||
@@ -544,7 +544,7 @@ namespace OpenSim.Data.Tests
|
||||
db.UpdateUserFriendPerms(user1, user3, 4);
|
||||
|
||||
fl1 = db.GetUserFriendList(user1);
|
||||
Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
|
||||
Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -560,7 +560,7 @@ namespace OpenSim.Data.Tests
|
||||
[Test]
|
||||
public void T041_UserAppearancePersistency()
|
||||
{
|
||||
AvatarAppearance appear = new AvatarAppearance();
|
||||
AvatarAppearance appear = new AvatarAppearance();
|
||||
UUID owner = UUID.Random();
|
||||
int serial = random.Next();
|
||||
byte[] visualp = new byte[218];
|
||||
@@ -698,7 +698,7 @@ namespace OpenSim.Data.Tests
|
||||
int size = random.Next(5,12);
|
||||
char ch ;
|
||||
for (int i=0; i<size; i++)
|
||||
{
|
||||
{
|
||||
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
|
||||
name.Append(ch);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenSim.Data
|
||||
public abstract UserAgentData GetAgentByUUID(UUID user);
|
||||
public abstract UserAgentData GetAgentByName(string name);
|
||||
public abstract UserAgentData GetAgentByName(string fname, string lname);
|
||||
public UserProfileData GetUserByUri(Uri uri) { return null; }
|
||||
public UserProfileData GetUserByUri(Uri uri) { return null; }
|
||||
public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
|
||||
public abstract void AddNewUserProfile(UserProfileData user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user