aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs45
1 files changed, 21 insertions, 24 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index cc810d7..b008499 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -52,10 +52,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
52 [TestFixture] 52 [TestFixture]
53 public class AttachmentsModuleTests 53 public class AttachmentsModuleTests
54 { 54 {
55 public Scene scene, scene2; 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, region2; 58 public ulong region1;
59 public AgentCircuitData acd1; 59 public AgentCircuitData acd1;
60 public SceneObjectGroup sog1, sog2, sog3; 60 public SceneObjectGroup sog1, sog2, sog3;
61 61
@@ -65,13 +65,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
65 TestHelpers.InMethod(); 65 TestHelpers.InMethod();
66 66
67 scene = SceneHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000); 67 scene = SceneHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
68 scene2 = SceneHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
69 68
70 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); 69 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
71 interregionComms.Initialise(new IniConfigSource()); 70 interregionComms.Initialise(new IniConfigSource());
72 interregionComms.PostInitialise(); 71 interregionComms.PostInitialise();
73 SceneHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms); 72 SceneHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
74 SceneHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
75 73
76 agent1 = UUID.Random(); 74 agent1 = UUID.Random();
77 random = new Random(); 75 random = new Random();
@@ -81,7 +79,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
81 79
82 //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 80 //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
83 region1 = scene.RegionInfo.RegionHandle; 81 region1 = scene.RegionInfo.RegionHandle;
84 region2 = scene2.RegionInfo.RegionHandle;
85 82
86 SceneHelpers.AddScenePresence(scene, agent1); 83 SceneHelpers.AddScenePresence(scene, agent1);
87 } 84 }
@@ -116,25 +113,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
116 // I'm commenting this test because scene setup NEEDS InventoryService to 113 // I'm commenting this test because scene setup NEEDS InventoryService to
117 // be non-null 114 // be non-null
118 //[Test] 115 //[Test]
119 public void T032_CrossAttachments() 116// public void T032_CrossAttachments()
120 { 117// {
121 TestHelpers.InMethod(); 118// TestHelpers.InMethod();
122 119//
123 ScenePresence presence = scene.GetScenePresence(agent1); 120// ScenePresence presence = scene.GetScenePresence(agent1);
124 ScenePresence presence2 = scene2.GetScenePresence(agent1); 121// ScenePresence presence2 = scene2.GetScenePresence(agent1);
125 presence2.AddAttachment(sog1); 122// presence2.AddAttachment(sog1);
126 presence2.AddAttachment(sog2); 123// presence2.AddAttachment(sog2);
127 124//
128 ISharedRegionModule serialiser = new SerialiserModule(); 125// ISharedRegionModule serialiser = new SerialiserModule();
129 SceneHelpers.SetupSceneModules(scene, new IniConfigSource(), serialiser); 126// SceneHelpers.SetupSceneModules(scene, new IniConfigSource(), serialiser);
130 SceneHelpers.SetupSceneModules(scene2, new IniConfigSource(), serialiser); 127// SceneHelpers.SetupSceneModules(scene2, new IniConfigSource(), serialiser);
131 128//
132 Assert.That(presence.HasAttachments(), Is.False, "Presence has attachments before cross"); 129// Assert.That(presence.HasAttachments(), Is.False, "Presence has attachments before cross");
133 130//
134 //Assert.That(presence2.CrossAttachmentsIntoNewRegion(region1, true), Is.True, "Cross was not successful"); 131// //Assert.That(presence2.CrossAttachmentsIntoNewRegion(region1, true), Is.True, "Cross was not successful");
135 Assert.That(presence2.HasAttachments(), Is.False, "Presence2 objects were not deleted"); 132// Assert.That(presence2.HasAttachments(), Is.False, "Presence2 objects were not deleted");
136 Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); 133// Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects");
137 } 134// }
138 135
139 private SceneObjectGroup NewSOG(UUID uuid, Scene scene, UUID agent) 136 private SceneObjectGroup NewSOG(UUID uuid, Scene scene, UUID agent)
140 { 137 {