diff options
author | Justin Clarke Casey | 2009-01-05 18:00:53 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-05 18:00:53 +0000 |
commit | 0b07c9762b4c70b6d234b70fb9e591c770dc1bf1 (patch) | |
tree | 95435e1c5c8aece7224666cae400978b74fae931 /OpenSim/Tests/Common/Mock | |
parent | * Extend stub to test the successful login of a user on the local login service (diff) | |
download | opensim-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 'OpenSim/Tests/Common/Mock')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs index 204ebd7..c234429 100644 --- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs +++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | |||
@@ -35,6 +35,18 @@ namespace OpenSim.Tests.Common.Mock | |||
35 | { | 35 | { |
36 | public class TestCommunicationsManager : CommunicationsManager | 36 | public class TestCommunicationsManager : CommunicationsManager |
37 | { | 37 | { |
38 | public IUserDataPlugin UserDataPlugin | ||
39 | { | ||
40 | get { return m_userDataPlugin; } | ||
41 | } | ||
42 | private IUserDataPlugin m_userDataPlugin; | ||
43 | |||
44 | public IInventoryDataPlugin InventoryDataPlugin | ||
45 | { | ||
46 | get { return m_inventoryDataPlugin; } | ||
47 | } | ||
48 | private IInventoryDataPlugin m_inventoryDataPlugin; | ||
49 | |||
38 | public TestCommunicationsManager() | 50 | public TestCommunicationsManager() |
39 | : this(null) | 51 | : this(null) |
40 | { | 52 | { |
@@ -43,16 +55,21 @@ namespace OpenSim.Tests.Common.Mock | |||
43 | public TestCommunicationsManager(NetworkServersInfo serversInfo) | 55 | public TestCommunicationsManager(NetworkServersInfo serversInfo) |
44 | : base(serversInfo, null, null, false, null) | 56 | : base(serversInfo, null, null, false, null) |
45 | { | 57 | { |
58 | m_userDataPlugin = new TestUserDataPlugin(); | ||
59 | m_inventoryDataPlugin = new TestInventoryDataPlugin(); | ||
60 | |||
46 | LocalInventoryService lis = new LocalInventoryService(); | 61 | LocalInventoryService lis = new LocalInventoryService(); |
62 | lis.AddPlugin(m_inventoryDataPlugin); | ||
47 | m_interServiceInventoryService = lis; | 63 | m_interServiceInventoryService = lis; |
48 | AddInventoryService(lis); | 64 | AddInventoryService(lis); |
49 | 65 | ||
50 | LocalUserServices lus = new LocalUserServices(991, 992, lis); | 66 | LocalUserServices lus = new LocalUserServices(991, 992, lis); |
67 | lus.AddPlugin(m_userDataPlugin); | ||
51 | m_userService = lus; | 68 | m_userService = lus; |
52 | m_userAdminService = lus; | 69 | m_userAdminService = lus; |
53 | 70 | ||
54 | LocalBackEndServices gs = new LocalBackEndServices(); | 71 | LocalBackEndServices gs = new LocalBackEndServices(); |
55 | m_gridService = gs; | 72 | m_gridService = gs; |
56 | } | 73 | } |
57 | } | 74 | } |
58 | } | 75 | } |