Move some previously common code back into separate tests. Remove unused region handle from test.

bulletsim
Justin Clark-Casey (justincc) 2011-08-16 22:27:52 +01:00
parent 0bbf7c21d7
commit d3c10e609e
1 changed files with 9 additions and 10 deletions

View File

@ -55,7 +55,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
public Scene scene; public Scene scene;
public UUID agent1; public UUID agent1;
public static Random random; public static Random random;
public ulong region1;
public AgentCircuitData acd1; public AgentCircuitData acd1;
public SceneObjectGroup sog1, sog2; public SceneObjectGroup sog1, sog2;
@ -73,11 +72,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
random = new Random(); random = new Random();
sog1 = NewSOG(UUID.Random(), scene, agent1); sog1 = NewSOG(UUID.Random(), scene, agent1);
sog2 = NewSOG(UUID.Random(), scene, agent1); sog2 = NewSOG(UUID.Random(), scene, agent1);
//ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
region1 = scene.RegionInfo.RegionHandle;
SceneHelpers.AddScenePresence(scene, agent1);
} }
[Test] [Test]
@ -85,8 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1); ScenePresence presence = SceneHelpers.AddScenePresence(scene, agent1);
presence.AddAttachment(sog1); presence.AddAttachment(sog1);
presence.AddAttachment(sog2); presence.AddAttachment(sog2);
@ -99,14 +92,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1); ScenePresence presence = SceneHelpers.AddScenePresence(scene, agent1);
presence.AddAttachment(sog1); presence.AddAttachment(sog1);
presence.AddAttachment(sog2); presence.AddAttachment(sog2);
presence.RemoveAttachment(sog1); presence.RemoveAttachment(sog1);
presence.RemoveAttachment(sog2); presence.RemoveAttachment(sog2);
Assert.That(presence.HasAttachments(), Is.False); Assert.That(presence.HasAttachments(), Is.False);
} }
// [Test]
// public void TestRezAttachmentsOnAvatarEntrance()
// {
// ScenePresence presence = scene.GetScenePresence(agent1);
// }
// I'm commenting this test because scene setup NEEDS InventoryService to // I'm commenting this test because scene setup NEEDS InventoryService to
// be non-null // be non-null
//[Test] //[Test]