aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs31
1 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
index 93b13f7..35b633e 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
@@ -56,11 +56,10 @@ namespace OpenSim.Region.Environment.Scenes.Tests
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Test adding an object to a scene. 59 /// Set up a test scene
60 /// </summary> 60 /// </summary>
61 [Test] 61 private Scene SetupScene()
62 public void TestAddSceneObject() 62 {
63 {
64 RegionInfo regInfo = new RegionInfo(1000, 1000, null, null); 63 RegionInfo regInfo = new RegionInfo(1000, 1000, null, null);
65 regInfo.RegionName = "Unit test region"; 64 regInfo.RegionName = "Unit test region";
66 AgentCircuitManager acm = new AgentCircuitManager(); 65 AgentCircuitManager acm = new AgentCircuitManager();
@@ -71,9 +70,16 @@ namespace OpenSim.Region.Environment.Scenes.Tests
71 StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); 70 StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", "");
72 IConfigSource configSource = new IniConfigSource(); 71 IConfigSource configSource = new IniConfigSource();
73 72
74 Scene scene 73 return new Scene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null);
75 = new Scene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null); 74 }
76 75
76 /// <summary>
77 /// Add a test object
78 /// </summary>
79 /// <param name="scene"></param>
80 /// <returns></returns>
81 private SceneObjectPart AddSceneObject(Scene scene)
82 {
77 SceneObjectGroup sceneObject = new SceneObjectGroup(); 83 SceneObjectGroup sceneObject = new SceneObjectGroup();
78 SceneObjectPart part 84 SceneObjectPart part
79 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); 85 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero);
@@ -83,6 +89,17 @@ namespace OpenSim.Region.Environment.Scenes.Tests
83 89
84 scene.AddNewSceneObject(sceneObject, false); 90 scene.AddNewSceneObject(sceneObject, false);
85 91
92 return part;
93 }
94
95 /// <summary>
96 /// Test adding an object to a scene.
97 /// </summary>
98 [Test]
99 public void TestAddSceneObject()
100 {
101 Scene scene = SetupScene();
102 SceneObjectPart part = AddSceneObject(scene);
86 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 103 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
87 104
88 //System.Console.WriteLine("retrievedPart : {0}", retrievedPart); 105 //System.Console.WriteLine("retrievedPart : {0}", retrievedPart);