diff options
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 :)
Diffstat (limited to 'OpenSim/Framework/Communications/Tests')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 125 |
1 files changed, 123 insertions, 2 deletions
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; | |||
39 | using OpenSim.Tests.Common.Mock; | 39 | using OpenSim.Tests.Common.Mock; |
40 | using OpenSim.Client.Linden; | 40 | using OpenSim.Client.Linden; |
41 | using OpenSim.Tests.Common; | 41 | using OpenSim.Tests.Common; |
42 | using OpenSim.Services.Interfaces; | ||
43 | using OpenMetaverse; | ||
42 | 44 | ||
43 | namespace OpenSim.Framework.Communications.Tests | 45 | namespace OpenSim.Framework.Communications.Tests |
44 | { | 46 | { |
@@ -73,7 +75,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
73 | m_localUserServices = (LocalUserServices) m_commsManager.UserService; | 75 | m_localUserServices = (LocalUserServices) m_commsManager.UserService; |
74 | m_localUserServices.AddUser(m_firstName,m_lastName,"boingboing","abc@ftw.com",42,43); | 76 | m_localUserServices.AddUser(m_firstName,m_lastName,"boingboing","abc@ftw.com",42,43); |
75 | 77 | ||
76 | m_loginService = new LLStandaloneLoginService((UserManagerBase) m_localUserServices, "Hello folks", m_commsManager.InterServiceInventoryService, | 78 | m_loginService = new LLStandaloneLoginService((UserManagerBase) m_localUserServices, "Hello folks", new TestInventoryService(), |
77 | m_commsManager.NetworkServersInfo, true, new LibraryRootFolder(String.Empty), m_regionConnector); | 79 | m_commsManager.NetworkServersInfo, true, new LibraryRootFolder(String.Empty), m_regionConnector); |
78 | 80 | ||
79 | m_userProfileData = m_localUserServices.GetUserProfile(m_firstName, m_lastName); | 81 | m_userProfileData = m_localUserServices.GetUserProfile(m_firstName, m_lastName); |
@@ -88,7 +90,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
88 | TestHelper.InMethod(); | 90 | TestHelper.InMethod(); |
89 | // We want to use our own LoginService for this test, one that | 91 | // We want to use our own LoginService for this test, one that |
90 | // doesn't require authentication. | 92 | // doesn't require authentication. |
91 | LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", m_commsManager.InterServiceInventoryService, | 93 | LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", new TestInventoryService(), |
92 | m_commsManager.NetworkServersInfo, false, new LibraryRootFolder(String.Empty), m_regionConnector); | 94 | m_commsManager.NetworkServersInfo, false, new LibraryRootFolder(String.Empty), m_regionConnector); |
93 | 95 | ||
94 | Hashtable loginParams = new Hashtable(); | 96 | Hashtable loginParams = new Hashtable(); |
@@ -440,4 +442,123 @@ namespace OpenSim.Framework.Communications.Tests | |||
440 | #endregion | 442 | #endregion |
441 | } | 443 | } |
442 | } | 444 | } |
445 | |||
446 | class TestInventoryService : IInventoryService | ||
447 | { | ||
448 | public TestInventoryService() | ||
449 | { | ||
450 | } | ||
451 | |||
452 | /// <summary> | ||
453 | /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/> | ||
454 | /// </summary> | ||
455 | /// <param name="userId"></param> | ||
456 | /// <returns></returns> | ||
457 | public bool CreateUserInventory(UUID userId) | ||
458 | { | ||
459 | return false; | ||
460 | } | ||
461 | |||
462 | /// <summary> | ||
463 | /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/> | ||
464 | /// </summary> | ||
465 | /// <param name="userId"></param> | ||
466 | /// <returns></returns> | ||
467 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | ||
468 | { | ||
469 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | ||
470 | InventoryFolderBase folder = new InventoryFolderBase(); | ||
471 | folder.ID = UUID.Random(); | ||
472 | folder.Owner = userId; | ||
473 | folders.Add(folder); | ||
474 | return folders; | ||
475 | } | ||
476 | |||
477 | /// <summary> | ||
478 | /// Returns a list of all the active gestures in a user's inventory. | ||
479 | /// </summary> | ||
480 | /// <param name="userId"> | ||
481 | /// The <see cref="UUID"/> of the user | ||
482 | /// </param> | ||
483 | /// <returns> | ||
484 | /// A flat list of the gesture items. | ||
485 | /// </returns> | ||
486 | public List<InventoryItemBase> GetActiveGestures(UUID userId) | ||
487 | { | ||
488 | return null; | ||
489 | } | ||
490 | |||
491 | public InventoryCollection GetUserInventory(UUID userID) | ||
492 | { | ||
493 | return null; | ||
494 | } | ||
495 | |||
496 | public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback) | ||
497 | { | ||
498 | } | ||
499 | |||
500 | public List<InventoryItemBase> GetFolderItems(UUID folderID) | ||
501 | { | ||
502 | return null; | ||
503 | } | ||
504 | |||
505 | public bool AddFolder(InventoryFolderBase folder) | ||
506 | { | ||
507 | return false; | ||
508 | } | ||
509 | |||
510 | public bool UpdateFolder(InventoryFolderBase folder) | ||
511 | { | ||
512 | return false; | ||
513 | } | ||
514 | |||
515 | public bool MoveFolder(InventoryFolderBase folder) | ||
516 | { | ||
517 | return false; | ||
518 | } | ||
519 | |||
520 | public bool PurgeFolder(InventoryFolderBase folder) | ||
521 | { | ||
522 | return false; | ||
523 | } | ||
524 | |||
525 | public bool AddItem(InventoryItemBase item) | ||
526 | { | ||
527 | return false; | ||
528 | } | ||
529 | |||
530 | public bool UpdateItem(InventoryItemBase item) | ||
531 | { | ||
532 | return false; | ||
533 | } | ||
534 | |||
535 | public bool DeleteItem(InventoryItemBase item) | ||
536 | { | ||
537 | return false; | ||
538 | } | ||
539 | |||
540 | public InventoryItemBase QueryItem(InventoryItemBase item) | ||
541 | { | ||
542 | return null; | ||
543 | } | ||
544 | |||
545 | public InventoryFolderBase QueryFolder(InventoryFolderBase folder) | ||
546 | { | ||
547 | return null; | ||
548 | } | ||
549 | |||
550 | public bool HasInventoryForUser(UUID userID) | ||
551 | { | ||
552 | return false; | ||
553 | } | ||
554 | |||
555 | public InventoryFolderBase RequestRootFolder(UUID userID) | ||
556 | { | ||
557 | InventoryFolderBase root = new InventoryFolderBase(); | ||
558 | root.ID = UUID.Random(); | ||
559 | root.Owner = userID; | ||
560 | root.ParentID = UUID.Zero; | ||
561 | return root; | ||
562 | } | ||
563 | } | ||
443 | } | 564 | } |