aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-04-25 23:34:30 +0100
committerJustin Clark-Casey (justincc)2014-04-25 23:34:30 +0100
commit9664273df6d74e33aacaf1d4a38a287e218009d4 (patch)
tree034adc453327ed80274d9d5ebbab8d95055b54a5
parentAdd basic sanity regression test for creating a scene. (diff)
downloadopensim-SC-9664273df6d74e33aacaf1d4a38a287e218009d4.zip
opensim-SC-9664273df6d74e33aacaf1d4a38a287e218009d4.tar.gz
opensim-SC-9664273df6d74e33aacaf1d4a38a287e218009d4.tar.bz2
opensim-SC-9664273df6d74e33aacaf1d4a38a287e218009d4.tar.xz
Add basic regression test for creating a var region
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs15
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs11
2 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 5ace6a3..eae61cd 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -59,6 +59,21 @@ namespace OpenSim.Region.Framework.Scenes.Tests
59 new SceneHelpers().SetupScene(); 59 new SceneHelpers().SetupScene();
60 } 60 }
61 61
62 [Test]
63 public void TestCreateVarScene()
64 {
65 TestHelpers.InMethod();
66 UUID regionUuid = TestHelpers.ParseTail(0x1);
67 uint sizeX = 512;
68 uint sizeY = 512;
69
70 Scene scene
71 = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource());
72
73 Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX);
74 Assert.AreEqual(sizeY, scene.RegionInfo.RegionSizeY);
75 }
76
62 /// <summary> 77 /// <summary>
63 /// Very basic scene update test. Should become more elaborate with time. 78 /// Very basic scene update test. Should become more elaborate with time.
64 /// </summary> 79 /// </summary>
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index eb8078d..874ff62 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -119,6 +119,11 @@ namespace OpenSim.Tests.Common
119 return SetupScene(name, id, x, y, new IniConfigSource()); 119 return SetupScene(name, id, x, y, new IniConfigSource());
120 } 120 }
121 121
122 public TestScene SetupScene(string name, UUID id, uint x, uint y, IConfigSource configSource)
123 {
124 return SetupScene(name, id, x, y, Constants.RegionSize, Constants.RegionSize, configSource);
125 }
126
122 /// <summary> 127 /// <summary>
123 /// Set up a scene. 128 /// Set up a scene.
124 /// </summary> 129 /// </summary>
@@ -126,10 +131,12 @@ namespace OpenSim.Tests.Common
126 /// <param name="id">ID of the region</param> 131 /// <param name="id">ID of the region</param>
127 /// <param name="x">X co-ordinate of the region</param> 132 /// <param name="x">X co-ordinate of the region</param>
128 /// <param name="y">Y co-ordinate of the region</param> 133 /// <param name="y">Y co-ordinate of the region</param>
134 /// <param name="sizeX">X size of scene</param>
135 /// <param name="sizeY">Y size of scene</param>
129 /// <param name="configSource"></param> 136 /// <param name="configSource"></param>
130 /// <returns></returns> 137 /// <returns></returns>
131 public TestScene SetupScene( 138 public TestScene SetupScene(
132 string name, UUID id, uint x, uint y, IConfigSource configSource) 139 string name, UUID id, uint x, uint y, uint sizeX, uint sizeY, IConfigSource configSource)
133 { 140 {
134 Console.WriteLine("Setting up test scene {0}", name); 141 Console.WriteLine("Setting up test scene {0}", name);
135 142
@@ -139,6 +146,8 @@ namespace OpenSim.Tests.Common
139 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); 146 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
140 regInfo.RegionName = name; 147 regInfo.RegionName = name;
141 regInfo.RegionID = id; 148 regInfo.RegionID = id;
149 regInfo.RegionSizeX = sizeX;
150 regInfo.RegionSizeY = sizeY;
142 151
143 SceneCommunicationService scs = new SceneCommunicationService(); 152 SceneCommunicationService scs = new SceneCommunicationService();
144 153