aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestAssetService.cs
diff options
context:
space:
mode:
authorArthur Valadares2009-08-11 12:07:54 -0300
committerArthur Valadares2009-08-11 12:07:54 -0300
commit18aa2ea0c5ebd8d5131902ed9856e68f46e76e11 (patch)
treec4adcda365c46052c3d15b4e6395e1bb8a2e97c5 /OpenSim/Tests/Common/Mock/TestAssetService.cs
parentReplace the Replaceable modules name (diff)
downloadopensim-SC-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.zip
opensim-SC-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.gz
opensim-SC-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.bz2
opensim-SC-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.xz
* Improves SceneSetupHelper to allow the tester to choose a real or mock, inventory and asset, service modules. The boolean startServices was replaced with realServices string. If the string contains the word asset, it will start a real asset module, if it contains inventory, it starts a real inventory. Otherwise, it use mock (NullPlugin-like) objects, for tests that don't really need functionality.
* SetupScene is now actually sharing the asset and inventory modules if the tester wishes to have multiple regions connected. To link regions, just start SetupScene with the same CommunicationManager for all scenes. SceneSetupHelper will hold a static reference to the modules and won't initialize them again, just run the scenes through the modules AddRegion, RegionLoaded and PostInitialize. * With the recent changes, both asset and inventory (and in the future, user) services should always be asked from the scene, not instantiated alone. The tests should reflect this new behavior and always start a scene.
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestAssetService.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetService.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index d35e3ed..5f1184b 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -31,13 +31,18 @@ using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Data; 32using OpenSim.Data;
33using OpenSim.Services.Interfaces; 33using OpenSim.Services.Interfaces;
34using Nini.Config;
34 35
35namespace OpenSim.Tests.Common.Mock 36namespace OpenSim.Tests.Common.Mock
36{ 37{
37 public class TestAssetService : IAssetService 38 public class TestAssetService : IAssetService
38 { 39 {
39 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>(); 40 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>();
40 41
42 public TestAssetService(IConfigSource config)
43 {
44 }
45
41 public AssetBase Get(string id) 46 public AssetBase Get(string id)
42 { 47 {
43 return Assets[ id ]; 48 return Assets[ id ];