From 156604e28e51d0a7e0c8018ce10eb517a9123ce4 Mon Sep 17 00:00:00 2001 From: diva Date: Thu, 11 Jun 2009 03:00:25 +0000 Subject: InterServiceInventoryService references *almost* completely removed from the simulator. Only a couple left, not important. Also updated the login tests -- Justin, this time I was able to fix this by myself :) --- .../Communications/Tests/LoginServiceTests.cs | 125 ++++++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Communications/Tests') diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 7a622ad..d637ef0 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -39,6 +39,8 @@ using OpenSim.Region.Communications.Local; using OpenSim.Tests.Common.Mock; using OpenSim.Client.Linden; using OpenSim.Tests.Common; +using OpenSim.Services.Interfaces; +using OpenMetaverse; namespace OpenSim.Framework.Communications.Tests { @@ -73,7 +75,7 @@ namespace OpenSim.Framework.Communications.Tests m_localUserServices = (LocalUserServices) m_commsManager.UserService; m_localUserServices.AddUser(m_firstName,m_lastName,"boingboing","abc@ftw.com",42,43); - m_loginService = new LLStandaloneLoginService((UserManagerBase) m_localUserServices, "Hello folks", m_commsManager.InterServiceInventoryService, + m_loginService = new LLStandaloneLoginService((UserManagerBase) m_localUserServices, "Hello folks", new TestInventoryService(), m_commsManager.NetworkServersInfo, true, new LibraryRootFolder(String.Empty), m_regionConnector); m_userProfileData = m_localUserServices.GetUserProfile(m_firstName, m_lastName); @@ -88,7 +90,7 @@ namespace OpenSim.Framework.Communications.Tests TestHelper.InMethod(); // We want to use our own LoginService for this test, one that // doesn't require authentication. - LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", m_commsManager.InterServiceInventoryService, + LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", new TestInventoryService(), m_commsManager.NetworkServersInfo, false, new LibraryRootFolder(String.Empty), m_regionConnector); Hashtable loginParams = new Hashtable(); @@ -440,4 +442,123 @@ namespace OpenSim.Framework.Communications.Tests #endregion } } + + class TestInventoryService : IInventoryService + { + public TestInventoryService() + { + } + + /// + /// + /// + /// + /// + public bool CreateUserInventory(UUID userId) + { + return false; + } + + /// + /// + /// + /// + /// + public List GetInventorySkeleton(UUID userId) + { + List folders = new List(); + InventoryFolderBase folder = new InventoryFolderBase(); + folder.ID = UUID.Random(); + folder.Owner = userId; + folders.Add(folder); + return folders; + } + + /// + /// Returns a list of all the active gestures in a user's inventory. + /// + /// + /// The of the user + /// + /// + /// A flat list of the gesture items. + /// + public List GetActiveGestures(UUID userId) + { + return null; + } + + public InventoryCollection GetUserInventory(UUID userID) + { + return null; + } + + public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback) + { + } + + public List GetFolderItems(UUID folderID) + { + return null; + } + + public bool AddFolder(InventoryFolderBase folder) + { + return false; + } + + public bool UpdateFolder(InventoryFolderBase folder) + { + return false; + } + + public bool MoveFolder(InventoryFolderBase folder) + { + return false; + } + + public bool PurgeFolder(InventoryFolderBase folder) + { + return false; + } + + public bool AddItem(InventoryItemBase item) + { + return false; + } + + public bool UpdateItem(InventoryItemBase item) + { + return false; + } + + public bool DeleteItem(InventoryItemBase item) + { + return false; + } + + public InventoryItemBase QueryItem(InventoryItemBase item) + { + return null; + } + + public InventoryFolderBase QueryFolder(InventoryFolderBase folder) + { + return null; + } + + public bool HasInventoryForUser(UUID userID) + { + return false; + } + + public InventoryFolderBase RequestRootFolder(UUID userID) + { + InventoryFolderBase root = new InventoryFolderBase(); + root.ID = UUID.Random(); + root.Owner = userID; + root.ParentID = UUID.Zero; + return root; + } + } } -- cgit v1.1