aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-05 18:00:53 +0000
committerJustin Clarke Casey2009-01-05 18:00:53 +0000
commit0b07c9762b4c70b6d234b70fb9e591c770dc1bf1 (patch)
tree95435e1c5c8aece7224666cae400978b74fae931 /OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs
parent* Extend stub to test the successful login of a user on the local login service (diff)
downloadopensim-SC_OLD-0b07c9762b4c70b6d234b70fb9e591c770dc1bf1.zip
opensim-SC_OLD-0b07c9762b4c70b6d234b70fb9e591c770dc1bf1.tar.gz
opensim-SC_OLD-0b07c9762b4c70b6d234b70fb9e591c770dc1bf1.tar.bz2
opensim-SC_OLD-0b07c9762b4c70b6d234b70fb9e591c770dc1bf1.tar.xz
* Simplify test code by always setting up mock 'in memory' user and inventory data plugins for every TestCommunicationsManager
* imo the gain in simplcity of test code outweighs the very small cost of setting up some stuff that some tests will never use
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs28
1 files changed, 1 insertions, 27 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs
index ea209fd..cf07ae5 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileTestUtils.cs
@@ -37,33 +37,7 @@ namespace OpenSim.Framework.Communications.Tests
37 /// Utility functions for carrying out user profile relate tests. 37 /// Utility functions for carrying out user profile relate tests.
38 /// </summary> 38 /// </summary>
39 public class UserProfileTestUtils 39 public class UserProfileTestUtils
40 { 40 {
41 /// <summary>
42 /// Set up standard services required for user tests.
43 /// </summary>
44 /// <returns>CommunicationsManager used to access these services</returns>
45 public static CommunicationsManager SetupServices()
46 {
47 return SetupServices(new TestUserDataPlugin(), new TestInventoryDataPlugin());
48 }
49
50 /// <summary>
51 /// Set up standard services required for user tests.
52 /// </summary>
53 /// <param name="userDataPlugin"></param>
54 /// <param name="inventoryDataPlugin"></param>
55 /// <returns>CommunicationsManager used to access these services</returns>
56 public static CommunicationsManager SetupServices(
57 IUserDataPlugin userDataPlugin, IInventoryDataPlugin inventoryDataPlugin)
58 {
59 CommunicationsManager commsManager = new TestCommunicationsManager();
60
61 ((LocalUserServices)commsManager.UserService).AddPlugin(userDataPlugin);
62 ((LocalInventoryService)commsManager.InventoryService).AddPlugin(inventoryDataPlugin);
63
64 return commsManager;
65 }
66
67 /// <summary> 41 /// <summary>
68 /// Create a test user with a standard inventory 42 /// Create a test user with a standard inventory
69 /// </summary> 43 /// </summary>