diff options
author | Justin Clarke Casey | 2008-11-11 18:21:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-11 18:21:43 +0000 |
commit | 4245cd90de4eb11cf6efc8c812c5862b0c8409c0 (patch) | |
tree | 87789b9107b9a393c25a47c7aa5db0f16472af2e | |
parent | * minor: remove log message that gives wrong user server 'version' (diff) | |
download | opensim-SC_OLD-4245cd90de4eb11cf6efc8c812c5862b0c8409c0.zip opensim-SC_OLD-4245cd90de4eb11cf6efc8c812c5862b0c8409c0.tar.gz opensim-SC_OLD-4245cd90de4eb11cf6efc8c812c5862b0c8409c0.tar.bz2 opensim-SC_OLD-4245cd90de4eb11cf6efc8c812c5862b0c8409c0.tar.xz |
minor: refactor some SceneTests code for future tests
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs | 31 |
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); |