diff options
author | Justin Clark-Casey (justincc) | 2009-11-12 18:44:03 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-12 18:44:03 +0000 |
commit | 2f092d271e80dbc7af47671fbb946de75b6110a9 (patch) | |
tree | b9add763319af6a907863139506892b150009792 /OpenSim/Framework/Communications | |
parent | minor: for now stop iar tests spewing log messages when running testsuite (diff) | |
download | opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.zip opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.gz opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.bz2 opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.xz |
Rename test services to mock services, since this is a more accurate description
remove duplicate mock inventory service
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 151 |
1 files changed, 4 insertions, 147 deletions
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index e891d9c..60f0ba8 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
75 | 75 | ||
76 | m_regionConnector.AddRegion(new RegionInfo(42, 43, m_capsEndPoint, m_regionExternalName)); | 76 | m_regionConnector.AddRegion(new RegionInfo(42, 43, m_capsEndPoint, m_regionExternalName)); |
77 | 77 | ||
78 | //IInventoryService m_inventoryService = new TestInventoryService(); | 78 | //IInventoryService m_inventoryService = new MockInventoryService(); |
79 | 79 | ||
80 | m_localUserServices = (LocalUserServices) m_commsManager.UserService; | 80 | m_localUserServices = (LocalUserServices) m_commsManager.UserService; |
81 | m_localUserServices.AddUser(m_firstName,m_lastName,"boingboing","abc@ftw.com",42,43); | 81 | m_localUserServices.AddUser(m_firstName,m_lastName,"boingboing","abc@ftw.com",42,43); |
@@ -95,7 +95,8 @@ namespace OpenSim.Framework.Communications.Tests | |||
95 | TestHelper.InMethod(); | 95 | TestHelper.InMethod(); |
96 | // We want to use our own LoginService for this test, one that | 96 | // We want to use our own LoginService for this test, one that |
97 | // doesn't require authentication. | 97 | // doesn't require authentication. |
98 | new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", new TestInventoryService(), | 98 | new LLStandaloneLoginService( |
99 | (UserManagerBase)m_commsManager.UserService, "Hello folks", new MockInventoryService(), | ||
99 | m_commsManager.NetworkServersInfo, false, new LibraryRootFolder(String.Empty), m_regionConnector); | 100 | m_commsManager.NetworkServersInfo, false, new LibraryRootFolder(String.Empty), m_regionConnector); |
100 | 101 | ||
101 | Hashtable loginParams = new Hashtable(); | 102 | Hashtable loginParams = new Hashtable(); |
@@ -457,148 +458,4 @@ namespace OpenSim.Framework.Communications.Tests | |||
457 | #endregion | 458 | #endregion |
458 | } | 459 | } |
459 | } | 460 | } |
460 | 461 | } \ No newline at end of file | |
461 | class TestInventoryService : IInventoryService | ||
462 | { | ||
463 | public TestInventoryService() | ||
464 | { | ||
465 | } | ||
466 | |||
467 | /// <summary> | ||
468 | /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/> | ||
469 | /// </summary> | ||
470 | /// <param name="userId"></param> | ||
471 | /// <returns></returns> | ||
472 | public bool CreateUserInventory(UUID userId) | ||
473 | { | ||
474 | return false; | ||
475 | } | ||
476 | |||
477 | /// <summary> | ||
478 | /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/> | ||
479 | /// </summary> | ||
480 | /// <param name="userId"></param> | ||
481 | /// <returns></returns> | ||
482 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | ||
483 | { | ||
484 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | ||
485 | InventoryFolderBase folder = new InventoryFolderBase(); | ||
486 | folder.ID = UUID.Random(); | ||
487 | folder.Owner = userId; | ||
488 | folders.Add(folder); | ||
489 | return folders; | ||
490 | } | ||
491 | |||
492 | /// <summary> | ||
493 | /// Returns a list of all the active gestures in a user's inventory. | ||
494 | /// </summary> | ||
495 | /// <param name="userId"> | ||
496 | /// The <see cref="UUID"/> of the user | ||
497 | /// </param> | ||
498 | /// <returns> | ||
499 | /// A flat list of the gesture items. | ||
500 | /// </returns> | ||
501 | public List<InventoryItemBase> GetActiveGestures(UUID userId) | ||
502 | { | ||
503 | return null; | ||
504 | } | ||
505 | |||
506 | public InventoryCollection GetUserInventory(UUID userID) | ||
507 | { | ||
508 | return null; | ||
509 | } | ||
510 | |||
511 | public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback) | ||
512 | { | ||
513 | } | ||
514 | |||
515 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | ||
516 | { | ||
517 | return null; | ||
518 | } | ||
519 | |||
520 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | ||
521 | { | ||
522 | return null; | ||
523 | } | ||
524 | |||
525 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | ||
526 | { | ||
527 | return null; | ||
528 | } | ||
529 | |||
530 | public bool AddFolder(InventoryFolderBase folder) | ||
531 | { | ||
532 | return false; | ||
533 | } | ||
534 | |||
535 | public bool UpdateFolder(InventoryFolderBase folder) | ||
536 | { | ||
537 | return false; | ||
538 | } | ||
539 | |||
540 | public bool MoveFolder(InventoryFolderBase folder) | ||
541 | { | ||
542 | return false; | ||
543 | } | ||
544 | |||
545 | public bool DeleteFolders(UUID ownerID, List<UUID> ids) | ||
546 | { | ||
547 | return false; | ||
548 | } | ||
549 | |||
550 | public bool PurgeFolder(InventoryFolderBase folder) | ||
551 | { | ||
552 | return false; | ||
553 | } | ||
554 | |||
555 | public bool AddItem(InventoryItemBase item) | ||
556 | { | ||
557 | return false; | ||
558 | } | ||
559 | |||
560 | public bool UpdateItem(InventoryItemBase item) | ||
561 | { | ||
562 | return false; | ||
563 | } | ||
564 | |||
565 | public bool MoveItems(UUID owner, List<InventoryItemBase> items) | ||
566 | { | ||
567 | return false; | ||
568 | } | ||
569 | |||
570 | public bool DeleteItems(UUID owner, List<UUID> items) | ||
571 | { | ||
572 | return false; | ||
573 | } | ||
574 | |||
575 | public InventoryItemBase GetItem(InventoryItemBase item) | ||
576 | { | ||
577 | return null; | ||
578 | } | ||
579 | |||
580 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | ||
581 | { | ||
582 | return null; | ||
583 | } | ||
584 | |||
585 | public bool HasInventoryForUser(UUID userID) | ||
586 | { | ||
587 | return false; | ||
588 | } | ||
589 | |||
590 | public InventoryFolderBase GetRootFolder(UUID userID) | ||
591 | { | ||
592 | InventoryFolderBase root = new InventoryFolderBase(); | ||
593 | root.ID = UUID.Random(); | ||
594 | root.Owner = userID; | ||
595 | root.ParentID = UUID.Zero; | ||
596 | return root; | ||
597 | } | ||
598 | |||
599 | public int GetAssetPermissions(UUID userID, UUID assetID) | ||
600 | { | ||
601 | return 1; | ||
602 | } | ||
603 | } | ||
604 | } | ||