diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs (renamed from OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs) | 77 |
1 files changed, 31 insertions, 46 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index 42587c1..8a103d7 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -26,61 +26,46 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | ||
29 | using NUnit.Framework; | 30 | using NUnit.Framework; |
31 | using NUnit.Framework.SyntaxHelpers; | ||
30 | using OpenMetaverse; | 32 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
32 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 34 | using OpenSim.Framework.Communications; |
35 | using OpenSim.Region.Framework.Scenes; | ||
36 | using OpenSim.Tests.Common; | ||
37 | using OpenSim.Tests.Common.Mock; | ||
38 | using OpenSim.Tests.Common.Setup; | ||
33 | 39 | ||
34 | namespace OpenSim.Region.Framework.Scenes.Tests | 40 | namespace OpenSim.Region.Framework.Scenes.Tests |
35 | { | 41 | { |
36 | /// <summary> | ||
37 | /// Scene presence tests | ||
38 | /// </summary> | ||
39 | [TestFixture] | 42 | [TestFixture] |
40 | public class SceneBaseTests | 43 | public class SceneGraphTests |
41 | { | 44 | { |
42 | private class SceneBaseImpl : SceneBase | 45 | [Test] |
46 | public void TestDuplicateObject() | ||
43 | { | 47 | { |
44 | public override void Update() | 48 | TestHelper.InMethod(); |
45 | { | 49 | Scene scene = SceneSetupHelpers.SetupScene(); |
46 | throw new NotImplementedException(); | ||
47 | } | ||
48 | |||
49 | public override void LoadWorldMap() | ||
50 | { | ||
51 | throw new NotImplementedException(); | ||
52 | } | ||
53 | |||
54 | public override void AddNewClient(IClientAPI client) | ||
55 | { | ||
56 | throw new NotImplementedException(); | ||
57 | } | ||
58 | |||
59 | public override void RemoveClient(UUID agentID) | ||
60 | { | ||
61 | throw new NotImplementedException(); | ||
62 | } | ||
63 | 50 | ||
64 | public override void OtherRegionUp(GridRegion otherRegion) | 51 | UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010"); |
65 | { | 52 | string objName = "obj1"; |
66 | throw new NotImplementedException(); | 53 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
67 | } | ||
68 | 54 | ||
69 | public override bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence) | 55 | SceneObjectPart part |
70 | { | 56 | = new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
71 | throw new NotImplementedException(); | 57 | { Name = objName, UUID = objUuid }; |
72 | } | ||
73 | 58 | ||
74 | public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) | 59 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); |
75 | { | 60 | |
76 | throw new NotImplementedException(); | 61 | SceneObjectGroup duplicatedSo |
77 | } | 62 | = scene.SceneGraph.DuplicateObject( |
78 | } | 63 | part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity); |
79 | 64 | ||
80 | [Test] | 65 | Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1)); |
81 | public void TestConstructor() | 66 | Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId)); |
82 | { | 67 | |
83 | new SceneBaseImpl(); | 68 | //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); |
84 | } | 69 | } |
85 | } | 70 | } |
86 | } | 71 | } \ No newline at end of file |