123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- using System;
- using System.Collections.Generic;
- using System.Reflection;
- using System.Text;
- using System.Threading;
- using System.Timers;
- using Timer=System.Timers.Timer;
- using Nini.Config;
- using NUnit.Framework;
- using OpenMetaverse;
- using OpenSim.Framework;
- using OpenSim.Region.Framework.Scenes;
- using OpenSim.Region.Framework.Interfaces;
- using OpenSim.Region.CoreModules.World.Serialiser;
- using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
- using OpenSim.Tests.Common;
- namespace OpenSim.Region.Framework.Scenes.Tests
- {
-
-
-
- [TestFixture]
- public class SceneTests : OpenSimTestCase
- {
- [Test]
- public void TestCreateScene()
- {
- TestHelpers.InMethod();
- new SceneHelpers().SetupScene();
- }
- [Test]
- public void TestCreateVarScene()
- {
- TestHelpers.InMethod();
- UUID regionUuid = TestHelpers.ParseTail(0x1);
- uint sizeX = 512;
- uint sizeY = 512;
- Scene scene
- = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource());
- Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX);
- Assert.AreEqual(sizeY, scene.RegionInfo.RegionSizeY);
- }
-
-
-
- [Test]
- public void TestUpdateScene()
- {
- TestHelpers.InMethod();
- Scene scene = new SceneHelpers().SetupScene();
- scene.Update(1);
- Assert.That(scene.Frame, Is.EqualTo(1));
- }
- [Test]
- public void TestShutdownScene()
- {
- TestHelpers.InMethod();
- Scene scene = new SceneHelpers().SetupScene();
- scene.Close();
- Assert.That(scene.ShuttingDown, Is.True);
- Assert.That(scene.Active, Is.False);
-
- scene.Update(1);
- Assert.That(scene.Frame, Is.EqualTo(0));
- }
- }
- }
|