aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
authorMelanie2010-08-30 02:30:28 +0100
committerMelanie2010-08-30 02:30:28 +0100
commit79bfa275da6b8be03678bfa284bd205410296b6a (patch)
tree1ce2f9f2da9bb0e3a8f5628d54f44e45bfc33044 /OpenSim/Tests/Common
parentRemove CRLF endings (diff)
parentFix a casting operation to use ToString() (diff)
downloadopensim-SC_OLD-79bfa275da6b8be03678bfa284bd205410296b6a.zip
opensim-SC_OLD-79bfa275da6b8be03678bfa284bd205410296b6a.tar.gz
opensim-SC_OLD-79bfa275da6b8be03678bfa284bd205410296b6a.tar.bz2
opensim-SC_OLD-79bfa275da6b8be03678bfa284bd205410296b6a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs24
-rw-r--r--OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs15
2 files changed, 23 insertions, 16 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index ed0b1a6..b70b47d 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Tests.Common.Mock
86 { 86 {
87 InventoryFolderBase folder = m_folders[folderID]; 87 InventoryFolderBase folder = m_folders[folderID];
88 88
89 m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID); 89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
90 90
91 List<InventoryItemBase> items = new List<InventoryItemBase>(); 91 List<InventoryItemBase> items = new List<InventoryItemBase>();
92 92
@@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Mock
94 { 94 {
95 if (item.Folder == folderID) 95 if (item.Folder == folderID)
96 { 96 {
97 m_log.DebugFormat("[MOCK INV DB]: getInventoryInFolder() adding item {0}", item.Name); 97// m_log.DebugFormat("[MOCK INV DB]: getInventoryInFolder() adding item {0}", item.Name);
98 items.Add(item); 98 items.Add(item);
99 } 99 }
100 } 100 }
@@ -106,7 +106,7 @@ namespace OpenSim.Tests.Common.Mock
106 106
107 public InventoryFolderBase getUserRootFolder(UUID user) 107 public InventoryFolderBase getUserRootFolder(UUID user)
108 { 108 {
109 m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); 109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
110 110
111 InventoryFolderBase folder = null; 111 InventoryFolderBase folder = null;
112 m_rootFolders.TryGetValue(user, out folder); 112 m_rootFolders.TryGetValue(user, out folder);
@@ -118,7 +118,7 @@ namespace OpenSim.Tests.Common.Mock
118 { 118 {
119 InventoryFolderBase parentFolder = m_folders[parentID]; 119 InventoryFolderBase parentFolder = m_folders[parentID];
120 120
121 m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID); 121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
122 122
123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
124 124
@@ -126,9 +126,9 @@ namespace OpenSim.Tests.Common.Mock
126 { 126 {
127 if (folder.ParentID == parentID) 127 if (folder.ParentID == parentID)
128 { 128 {
129 m_log.DebugFormat( 129// m_log.DebugFormat(
130 "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", 130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
131 folder.Name, folder.ID, parentFolder.Name, parentFolder.ID); 131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
132 132
133 folders.Add(folder); 133 folders.Add(folder);
134 } 134 }
@@ -152,9 +152,9 @@ namespace OpenSim.Tests.Common.Mock
152 152
153 public void addInventoryFolder(InventoryFolderBase folder) 153 public void addInventoryFolder(InventoryFolderBase folder)
154 { 154 {
155 m_log.DebugFormat( 155// m_log.DebugFormat(
156 "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}", 156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
157 folder.Name, folder.ID, (AssetType)folder.Type); 157// folder.Name, folder.ID, (AssetType)folder.Type);
158 158
159 m_folders[folder.ID] = folder; 159 m_folders[folder.ID] = folder;
160 160
@@ -187,8 +187,8 @@ namespace OpenSim.Tests.Common.Mock
187 { 187 {
188 InventoryFolderBase folder = m_folders[item.Folder]; 188 InventoryFolderBase folder = m_folders[item.Folder];
189 189
190 m_log.DebugFormat( 190// m_log.DebugFormat(
191 "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID); 191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
192 192
193 m_items[item.ID] = item; 193 m_items[item.ID] = item;
194 } 194 }
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index 380f258..26156f3 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -127,12 +127,19 @@ namespace OpenSim.Tests.Common.Setup
127 { 127 {
128 UserAccount ua 128 UserAccount ua
129 = new UserAccount(userId) 129 = new UserAccount(userId)
130 { FirstName = firstName, LastName = lastName, ServiceURLs = new Dictionary<string, object>() }; 130 { FirstName = firstName, LastName = lastName };
131 CreateUserWithInventory(scene, ua, pw);
132 return ua;
133 }
134
135 public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw)
136 {
137 // FIXME: This should really be set up by UserAccount itself
138 ua.ServiceURLs = new Dictionary<string, object>();
139
131 scene.UserAccountService.StoreUserAccount(ua); 140 scene.UserAccountService.StoreUserAccount(ua);
132 scene.InventoryService.CreateUserInventory(ua.PrincipalID); 141 scene.InventoryService.CreateUserInventory(ua.PrincipalID);
133 scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); 142 scene.AuthenticationService.SetPassword(ua.PrincipalID, pw);
134 143 }
135 return ua;
136 }
137 } 144 }
138} \ No newline at end of file 145} \ No newline at end of file