From 71e05a5707f1eaed098592dc1c3feb3389731634 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 28 Nov 2008 19:39:46 +0000
Subject: * test: Add a wodge of code in order to be able to slightly extend a
test to deliver a taken object to a user inventory folder without throwing an
exception * test doesn't actually double check for the presence of the item
yet
---
.../Region/Environment/Scenes/Tests/SceneTestUtils.cs | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
index 51be872..468a4ad 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
@@ -29,6 +29,7 @@ using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
+using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Environment.Scenes;
@@ -52,15 +53,20 @@ namespace OpenSim.Region.Environment.Scenes.Tests
AgentCircuitManager acm = new AgentCircuitManager();
CommunicationsManager cm = new TestCommunicationsManager();
- SceneCommunicationService scs = new SceneCommunicationService(cm);
+ SceneCommunicationService scs = new SceneCommunicationService(cm);
+
+ SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
+ AssetCache ac = new AssetCache(assetService);
+
StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", "");
BaseHttpServer httpServer = new BaseHttpServer(666);
IConfigSource configSource = new IniConfigSource();
TestScene testScene = new TestScene(
- regInfo, acm, cm, scs, null, sm, httpServer, null, false, false, false, configSource, null);
+ regInfo, acm, cm, scs, ac, sm, httpServer, null, false, false, false, configSource, null);
testScene.LandChannel = new TestLandChannel();
+ testScene.LoadWorldMap();
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
@@ -93,7 +99,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests
scene.NewUserConnection(agent);
IClientAPI client = new TestClient(agent);
- scene.AddNewClient(client, false);
+ scene.AddNewClient(client, true);
+ scene.AgentCrossing(agent.AgentID, new Vector3(90, 90, 90), false);
return client;
}
@@ -123,15 +130,16 @@ namespace OpenSim.Region.Environment.Scenes.Tests
///
///
///
+ ///
///
public static void DeleteSceneObjectAsync(
- TestScene scene, SceneObjectPart part, DeRezAction action, IClientAPI client)
+ TestScene scene, SceneObjectPart part, DeRezAction action, UUID destinationId, IClientAPI client)
{
// Turn off the timer on the async sog deleter - we'll crank it by hand within a unit test
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
- scene.DeRezObject(client, part.LocalId, UUID.Zero, action, UUID.Zero);
+ scene.DeRezObject(client, part.LocalId, UUID.Zero, action, destinationId);
sogd.InventoryDeQueueAndDelete();
}
}
--
cgit v1.1