diff options
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please
don't use until I do the companion commit to modules later on.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
3 files changed, 23 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index c9662ef..7d9a6a9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
71 | Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); | 71 | Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); |
72 | 72 | ||
73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); | 73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); |
74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); | 74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); |
75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); | 75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); |
76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); | 76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); |
77 | 77 | ||
@@ -84,6 +84,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
84 | Assert.That(dupePart1.PhysActor, Is.Not.Null); | 84 | Assert.That(dupePart1.PhysActor, Is.Not.Null); |
85 | Assert.That(dupePart2.PhysActor, Is.Not.Null); | 85 | Assert.That(dupePart2.PhysActor, Is.Not.Null); |
86 | */ | 86 | */ |
87 | } | 87 | } |
88 | } | 88 | } |
89 | } \ No newline at end of file | 89 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index e3ef263..60824be 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
270 | TestHelper.InMethod(); | 270 | TestHelper.InMethod(); |
271 | //log4net.Config.XmlConfigurator.Configure(); | 271 | //log4net.Config.XmlConfigurator.Configure(); |
272 | 272 | ||
273 | TestScene scene = SceneSetupHelpers.SetupScene(); | 273 | TestScene scene = SceneSetupHelpers.SetupScene(); |
274 | 274 | ||
275 | string rootPartName = "rootpart"; | 275 | string rootPartName = "rootpart"; |
276 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 276 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
@@ -282,17 +282,17 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
282 | { Name = rootPartName, UUID = rootPartUuid }; | 282 | { Name = rootPartName, UUID = rootPartUuid }; |
283 | SceneObjectPart linkPart | 283 | SceneObjectPart linkPart |
284 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 284 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
285 | { Name = linkPartName, UUID = linkPartUuid }; | 285 | { Name = linkPartName, UUID = linkPartUuid }; |
286 | 286 | ||
287 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 287 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
288 | sog.AddPart(linkPart); | 288 | sog.AddPart(linkPart); |
289 | scene.AddNewSceneObject(sog, true); | 289 | scene.AddNewSceneObject(sog, true); |
290 | 290 | ||
291 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 291 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
292 | // scene backup thread. | 292 | // scene backup thread. |
293 | scene.Backup(true); | 293 | scene.Backup(true); |
294 | 294 | ||
295 | List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); | 295 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
296 | 296 | ||
297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
298 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(2)); | 298 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(2)); |
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
309 | TestHelper.InMethod(); | 309 | TestHelper.InMethod(); |
310 | //log4net.Config.XmlConfigurator.Configure(); | 310 | //log4net.Config.XmlConfigurator.Configure(); |
311 | 311 | ||
312 | TestScene scene = SceneSetupHelpers.SetupScene(); | 312 | TestScene scene = SceneSetupHelpers.SetupScene(); |
313 | 313 | ||
314 | string rootPartName = "rootpart"; | 314 | string rootPartName = "rootpart"; |
315 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 315 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
@@ -321,11 +321,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
321 | { Name = rootPartName, UUID = rootPartUuid }; | 321 | { Name = rootPartName, UUID = rootPartUuid }; |
322 | SceneObjectPart linkPart | 322 | SceneObjectPart linkPart |
323 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 323 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
324 | { Name = linkPartName, UUID = linkPartUuid }; | 324 | { Name = linkPartName, UUID = linkPartUuid }; |
325 | 325 | ||
326 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 326 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
327 | sog.AddPart(linkPart); | 327 | sog.AddPart(linkPart); |
328 | scene.AddNewSceneObject(sog, true); | 328 | scene.AddNewSceneObject(sog, true); |
329 | 329 | ||
330 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 330 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
331 | // scene backup thread. | 331 | // scene backup thread. |
@@ -333,9 +333,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
333 | 333 | ||
334 | // These changes should occur immediately without waiting for a backup pass | 334 | // These changes should occur immediately without waiting for a backup pass |
335 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); | 335 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); |
336 | scene.DeleteSceneObject(groupToDelete, false); | 336 | scene.DeleteSceneObject(groupToDelete, false); |
337 | 337 | ||
338 | List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); | 338 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
339 | 339 | ||
340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
341 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(1)); | 341 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(1)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index da8199d..fe59d4f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -59,8 +59,8 @@ namespace OpenSim.Region.Framework.Tests | |||
59 | string userFirstName = "Jock"; | 59 | string userFirstName = "Jock"; |
60 | string userLastName = "Stirrup"; | 60 | string userLastName = "Stirrup"; |
61 | string userPassword = "troll"; | 61 | string userPassword = "troll"; |
62 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 62 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
63 | return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); | 63 | return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); |
64 | } | 64 | } |
65 | 65 | ||
66 | protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) | 66 | protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) |
@@ -70,14 +70,16 @@ namespace OpenSim.Region.Framework.Tests | |||
70 | SceneObjectPart part1 | 70 | SceneObjectPart part1 |
71 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 71 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
72 | { Name = part1Name, UUID = part1Id }; | 72 | { Name = part1Name, UUID = part1Id }; |
73 | return new SceneObjectGroup(part1); | 73 | return new SceneObjectGroup(part1); |
74 | } | 74 | } |
75 | 75 | ||
76 | protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) | 76 | protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) |
77 | { | 77 | { |
78 | AssetNotecard nc = new AssetNotecard("Hello World!"); | 78 | AssetNotecard nc = new AssetNotecard(); |
79 | nc.BodyText = "Hello World!"; | ||
80 | nc.Encode(); | ||
79 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | 81 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); |
80 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | 82 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); |
81 | AssetBase ncAsset | 83 | AssetBase ncAsset |
82 | = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); | 84 | = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); |
83 | scene.AssetService.Store(ncAsset); | 85 | scene.AssetService.Store(ncAsset); |
@@ -112,9 +114,9 @@ namespace OpenSim.Region.Framework.Tests | |||
112 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); | 114 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); |
113 | 115 | ||
114 | InventoryItemBase ncUserItem | 116 | InventoryItemBase ncUserItem |
115 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); | 117 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); |
116 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); | 118 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); |
117 | } | 119 | } |
118 | 120 | ||
119 | /// <summary> | 121 | /// <summary> |
120 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. | 122 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. |
@@ -136,7 +138,7 @@ namespace OpenSim.Region.Framework.Tests | |||
136 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); | 138 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); |
137 | 139 | ||
138 | InventoryItemBase ncUserItem | 140 | InventoryItemBase ncUserItem |
139 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); | 141 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); |
140 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); | 142 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); |
141 | } | 143 | } |
142 | } | 144 | } |