aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs1
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryService.cs9
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs11
-rw-r--r--OpenSim/Tests/Common/TestLogging.cs46
4 files changed, 60 insertions, 7 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index bf4ddf0..fe31729 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -120,6 +120,7 @@ namespace OpenSim.Tests.Common.Mock
120 public event ObjectExtraParams OnUpdateExtraParams; 120 public event ObjectExtraParams OnUpdateExtraParams;
121 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 121 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
122 public event ObjectSelect OnObjectSelect; 122 public event ObjectSelect OnObjectSelect;
123 public event ObjectRequest OnObjectRequest;
123 public event GenericCall7 OnObjectDescription; 124 public event GenericCall7 OnObjectDescription;
124 public event GenericCall7 OnObjectName; 125 public event GenericCall7 OnObjectName;
125 public event GenericCall7 OnObjectClickAction; 126 public event GenericCall7 OnObjectClickAction;
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index 6635700..ba9cbe9 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -148,12 +148,12 @@ namespace OpenSim.Tests.Common.Mock
148 return false; 148 return false;
149 } 149 }
150 150
151 public InventoryItemBase QueryItem(InventoryItemBase item) 151 public InventoryItemBase GetItem(InventoryItemBase item)
152 { 152 {
153 return null; 153 return null;
154 } 154 }
155 155
156 public InventoryFolderBase QueryFolder(InventoryFolderBase folder) 156 public InventoryFolderBase GetFolder(InventoryFolderBase folder)
157 { 157 {
158 return null; 158 return null;
159 } 159 }
@@ -171,5 +171,10 @@ namespace OpenSim.Tests.Common.Mock
171 root.ParentID = UUID.Zero; 171 root.ParentID = UUID.Zero;
172 return root; 172 return root;
173 } 173 }
174
175 public int GetAssetPermissions(UUID userID, UUID assetID)
176 {
177 return 1;
178 }
174 } 179 }
175} 180}
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index b1b32cc..f418252 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -154,7 +154,7 @@ namespace OpenSim.Tests.Common.Setup
154 TestScene testScene = new TestScene( 154 TestScene testScene = new TestScene(
155 regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null); 155 regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null);
156 156
157 INonSharedRegionModule capsModule = new CapabilitiesModule(); 157 INonSharedRegionModule capsModule = new CapabilitiesModule();
158 capsModule.Initialise(new IniConfigSource()); 158 capsModule.Initialise(new IniConfigSource());
159 testScene.AddRegionModule(capsModule.Name, capsModule); 159 testScene.AddRegionModule(capsModule.Name, capsModule);
160 capsModule.AddRegion(testScene); 160 capsModule.AddRegion(testScene);
@@ -163,7 +163,7 @@ namespace OpenSim.Tests.Common.Setup
163 godsModule.Initialise(testScene, new IniConfigSource()); 163 godsModule.Initialise(testScene, new IniConfigSource());
164 testScene.AddModule(godsModule.Name, godsModule); 164 testScene.AddModule(godsModule.Name, godsModule);
165 realServices = realServices.ToLower(); 165 realServices = realServices.ToLower();
166 IniConfigSource config = new IniConfigSource(); 166 IConfigSource config = new IniConfigSource();
167 167
168 // If we have a brand new scene, need to initialize shared region modules 168 // If we have a brand new scene, need to initialize shared region modules
169 if ((m_assetService == null && m_inventoryService == null) || newScene) 169 if ((m_assetService == null && m_inventoryService == null) || newScene)
@@ -198,7 +198,7 @@ namespace OpenSim.Tests.Common.Setup
198 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); 198 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
199 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); 199 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
200 testScene.PhysicsScene 200 testScene.PhysicsScene
201 = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", configSource, "test"); 201 = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test");
202 202
203 return testScene; 203 return testScene;
204 } 204 }
@@ -206,7 +206,7 @@ namespace OpenSim.Tests.Common.Setup
206 private static void StartAssetService(Scene testScene, bool real) 206 private static void StartAssetService(Scene testScene, bool real)
207 { 207 {
208 ISharedRegionModule assetService = new LocalAssetServicesConnector(); 208 ISharedRegionModule assetService = new LocalAssetServicesConnector();
209 IniConfigSource config = new IniConfigSource(); 209 IConfigSource config = new IniConfigSource();
210 config.AddConfig("Modules"); 210 config.AddConfig("Modules");
211 config.AddConfig("AssetService"); 211 config.AddConfig("AssetService");
212 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); 212 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
@@ -225,7 +225,7 @@ namespace OpenSim.Tests.Common.Setup
225 private static void StartInventoryService(Scene testScene, bool real) 225 private static void StartInventoryService(Scene testScene, bool real)
226 { 226 {
227 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); 227 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
228 IniConfigSource config = new IniConfigSource(); 228 IConfigSource config = new IniConfigSource();
229 config.AddConfig("Modules"); 229 config.AddConfig("Modules");
230 config.AddConfig("InventoryService"); 230 config.AddConfig("InventoryService");
231 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); 231 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
@@ -418,4 +418,5 @@ namespace OpenSim.Tests.Common.Setup
418 sogd.InventoryDeQueueAndDelete(); 418 sogd.InventoryDeQueueAndDelete();
419 } 419 }
420 } 420 }
421
421} 422}
diff --git a/OpenSim/Tests/Common/TestLogging.cs b/OpenSim/Tests/Common/TestLogging.cs
new file mode 100644
index 0000000..4a08344
--- /dev/null
+++ b/OpenSim/Tests/Common/TestLogging.cs
@@ -0,0 +1,46 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using log4net.Appender;
32using log4net.Layout;
33
34namespace OpenSim.Tests.Common
35{
36 public static class TestLogging
37 {
38 public static void LogToConsole()
39 {
40 ConsoleAppender consoleAppender = new ConsoleAppender();
41 consoleAppender.Layout =
42 new PatternLayout("%date [%thread] %-5level %logger [%property{NDC}] - %message%newline");
43 log4net.Config.BasicConfigurator.Configure(consoleAppender);
44 }
45 }
46}