diff options
author | Justin Clark-Casey (justincc) | 2011-08-16 22:27:52 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-16 22:27:52 +0100 |
commit | d3c10e609e2862165c3a9a4e1f436634191201d3 (patch) | |
tree | d8e847c2cf2baf429f1710ff865f142a26325e62 | |
parent | Isolate existing incomplete attachments tests rather than have them rely on e... (diff) | |
download | opensim-SC_OLD-d3c10e609e2862165c3a9a4e1f436634191201d3.zip opensim-SC_OLD-d3c10e609e2862165c3a9a4e1f436634191201d3.tar.gz opensim-SC_OLD-d3c10e609e2862165c3a9a4e1f436634191201d3.tar.bz2 opensim-SC_OLD-d3c10e609e2862165c3a9a4e1f436634191201d3.tar.xz |
Move some previously common code back into separate tests. Remove unused region handle from test.
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index d182996..c524090 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -55,7 +55,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
55 | public Scene scene; | 55 | public Scene scene; |
56 | public UUID agent1; | 56 | public UUID agent1; |
57 | public static Random random; | 57 | public static Random random; |
58 | public ulong region1; | ||
59 | public AgentCircuitData acd1; | 58 | public AgentCircuitData acd1; |
60 | public SceneObjectGroup sog1, sog2; | 59 | public SceneObjectGroup sog1, sog2; |
61 | 60 | ||
@@ -73,11 +72,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
73 | random = new Random(); | 72 | random = new Random(); |
74 | sog1 = NewSOG(UUID.Random(), scene, agent1); | 73 | sog1 = NewSOG(UUID.Random(), scene, agent1); |
75 | sog2 = NewSOG(UUID.Random(), scene, agent1); | 74 | sog2 = NewSOG(UUID.Random(), scene, agent1); |
76 | |||
77 | //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); | ||
78 | region1 = scene.RegionInfo.RegionHandle; | ||
79 | |||
80 | SceneHelpers.AddScenePresence(scene, agent1); | ||
81 | } | 75 | } |
82 | 76 | ||
83 | [Test] | 77 | [Test] |
@@ -85,8 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
85 | { | 79 | { |
86 | TestHelpers.InMethod(); | 80 | TestHelpers.InMethod(); |
87 | 81 | ||
88 | ScenePresence presence = scene.GetScenePresence(agent1); | 82 | ScenePresence presence = SceneHelpers.AddScenePresence(scene, agent1); |
89 | |||
90 | presence.AddAttachment(sog1); | 83 | presence.AddAttachment(sog1); |
91 | presence.AddAttachment(sog2); | 84 | presence.AddAttachment(sog2); |
92 | 85 | ||
@@ -99,14 +92,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
99 | { | 92 | { |
100 | TestHelpers.InMethod(); | 93 | TestHelpers.InMethod(); |
101 | 94 | ||
102 | ScenePresence presence = scene.GetScenePresence(agent1); | 95 | ScenePresence presence = SceneHelpers.AddScenePresence(scene, agent1); |
103 | presence.AddAttachment(sog1); | 96 | presence.AddAttachment(sog1); |
104 | presence.AddAttachment(sog2); | 97 | presence.AddAttachment(sog2); |
105 | presence.RemoveAttachment(sog1); | 98 | presence.RemoveAttachment(sog1); |
106 | presence.RemoveAttachment(sog2); | 99 | presence.RemoveAttachment(sog2); |
107 | Assert.That(presence.HasAttachments(), Is.False); | 100 | Assert.That(presence.HasAttachments(), Is.False); |
108 | } | 101 | } |
109 | 102 | ||
103 | // [Test] | ||
104 | // public void TestRezAttachmentsOnAvatarEntrance() | ||
105 | // { | ||
106 | // ScenePresence presence = scene.GetScenePresence(agent1); | ||
107 | // } | ||
108 | |||
110 | // I'm commenting this test because scene setup NEEDS InventoryService to | 109 | // I'm commenting this test because scene setup NEEDS InventoryService to |
111 | // be non-null | 110 | // be non-null |
112 | //[Test] | 111 | //[Test] |