diff options
author | Tom | 2011-09-04 07:06:36 -0700 |
---|---|---|
committer | Tom | 2011-09-04 07:06:36 -0700 |
commit | 66dec3b8742eff04fbbcc6e3249fe4ba87986500 (patch) | |
tree | 76cc708a821d35fac5cdbbce2de304b47064e732 /OpenSim/Data/Tests/RegionTests.cs | |
parent | Guard another nullref (diff) | |
parent | Fixed BulletSim config files for Linux *.so libraries. (diff) | |
download | opensim-SC-66dec3b8742eff04fbbcc6e3249fe4ba87986500.zip opensim-SC-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.gz opensim-SC-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.bz2 opensim-SC-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.xz |
Resolve merge commits, stage 1
Diffstat (limited to 'OpenSim/Data/Tests/RegionTests.cs')
-rw-r--r-- | OpenSim/Data/Tests/RegionTests.cs | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index 44cf1ab..cac8cac 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs | |||
@@ -151,7 +151,7 @@ namespace OpenSim.Data.Tests | |||
151 | [Test] | 151 | [Test] |
152 | public void T001_LoadEmpty() | 152 | public void T001_LoadEmpty() |
153 | { | 153 | { |
154 | TestHelper.InMethod(); | 154 | TestHelpers.InMethod(); |
155 | 155 | ||
156 | List<SceneObjectGroup> objs = db.LoadObjects(region1); | 156 | List<SceneObjectGroup> objs = db.LoadObjects(region1); |
157 | List<SceneObjectGroup> objs3 = db.LoadObjects(region3); | 157 | List<SceneObjectGroup> objs3 = db.LoadObjects(region3); |
@@ -169,7 +169,7 @@ namespace OpenSim.Data.Tests | |||
169 | [Test] | 169 | [Test] |
170 | public void T010_StoreSimpleObject() | 170 | public void T010_StoreSimpleObject() |
171 | { | 171 | { |
172 | TestHelper.InMethod(); | 172 | TestHelpers.InMethod(); |
173 | 173 | ||
174 | SceneObjectGroup sog = NewSOG("object1", prim1, region1); | 174 | SceneObjectGroup sog = NewSOG("object1", prim1, region1); |
175 | SceneObjectGroup sog2 = NewSOG("object2", prim2, region1); | 175 | SceneObjectGroup sog2 = NewSOG("object2", prim2, region1); |
@@ -204,7 +204,7 @@ namespace OpenSim.Data.Tests | |||
204 | [Test] | 204 | [Test] |
205 | public void T011_ObjectNames() | 205 | public void T011_ObjectNames() |
206 | { | 206 | { |
207 | TestHelper.InMethod(); | 207 | TestHelpers.InMethod(); |
208 | 208 | ||
209 | List<SceneObjectGroup> objs = db.LoadObjects(region1); | 209 | List<SceneObjectGroup> objs = db.LoadObjects(region1); |
210 | foreach (SceneObjectGroup sog in objs) | 210 | foreach (SceneObjectGroup sog in objs) |
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests | |||
218 | [Test] | 218 | [Test] |
219 | public void T012_SceneParts() | 219 | public void T012_SceneParts() |
220 | { | 220 | { |
221 | TestHelper.InMethod(); | 221 | TestHelpers.InMethod(); |
222 | 222 | ||
223 | UUID tmp0 = UUID.Random(); | 223 | UUID tmp0 = UUID.Random(); |
224 | UUID tmp1 = UUID.Random(); | 224 | UUID tmp1 = UUID.Random(); |
@@ -253,7 +253,7 @@ namespace OpenSim.Data.Tests | |||
253 | [Test] | 253 | [Test] |
254 | public void T013_DatabasePersistency() | 254 | public void T013_DatabasePersistency() |
255 | { | 255 | { |
256 | TestHelper.InMethod(); | 256 | TestHelpers.InMethod(); |
257 | 257 | ||
258 | // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data | 258 | // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data |
259 | // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored | 259 | // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored |
@@ -304,9 +304,9 @@ namespace OpenSim.Data.Tests | |||
304 | regionInfo.RegionLocX = 0; | 304 | regionInfo.RegionLocX = 0; |
305 | regionInfo.RegionLocY = 0; | 305 | regionInfo.RegionLocY = 0; |
306 | 306 | ||
307 | // Scene scene = new Scene(regionInfo); | ||
308 | |||
309 | SceneObjectPart sop = new SceneObjectPart(); | 307 | SceneObjectPart sop = new SceneObjectPart(); |
308 | SceneObjectGroup sog = new SceneObjectGroup(sop); | ||
309 | |||
310 | sop.RegionHandle = regionh; | 310 | sop.RegionHandle = regionh; |
311 | sop.UUID = uuid; | 311 | sop.UUID = uuid; |
312 | sop.LocalId = localid; | 312 | sop.LocalId = localid; |
@@ -373,8 +373,6 @@ namespace OpenSim.Data.Tests | |||
373 | 373 | ||
374 | // This is necessary or object will not be inserted in DB | 374 | // This is necessary or object will not be inserted in DB |
375 | sop.Flags = PrimFlags.None; | 375 | sop.Flags = PrimFlags.None; |
376 | |||
377 | SceneObjectGroup sog = new SceneObjectGroup(sop); | ||
378 | 376 | ||
379 | // Inserts group in DB | 377 | // Inserts group in DB |
380 | db.StoreObject(sog,region3); | 378 | db.StoreObject(sog,region3); |
@@ -430,7 +428,7 @@ namespace OpenSim.Data.Tests | |||
430 | [Test] | 428 | [Test] |
431 | public void T014_UpdateObject() | 429 | public void T014_UpdateObject() |
432 | { | 430 | { |
433 | TestHelper.InMethod(); | 431 | TestHelpers.InMethod(); |
434 | 432 | ||
435 | string text1 = "object1 text"; | 433 | string text1 = "object1 text"; |
436 | SceneObjectGroup sog = FindSOG("object1", region1); | 434 | SceneObjectGroup sog = FindSOG("object1", region1); |
@@ -540,7 +538,7 @@ namespace OpenSim.Data.Tests | |||
540 | [Test] | 538 | [Test] |
541 | public void T015_LargeSceneObjects() | 539 | public void T015_LargeSceneObjects() |
542 | { | 540 | { |
543 | TestHelper.InMethod(); | 541 | TestHelpers.InMethod(); |
544 | 542 | ||
545 | UUID id = UUID.Random(); | 543 | UUID id = UUID.Random(); |
546 | Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>(); | 544 | Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>(); |
@@ -587,7 +585,7 @@ namespace OpenSim.Data.Tests | |||
587 | //[Test] | 585 | //[Test] |
588 | public void T016_RandomSogWithSceneParts() | 586 | public void T016_RandomSogWithSceneParts() |
589 | { | 587 | { |
590 | TestHelper.InMethod(); | 588 | TestHelpers.InMethod(); |
591 | 589 | ||
592 | PropertyScrambler<SceneObjectPart> scrambler = | 590 | PropertyScrambler<SceneObjectPart> scrambler = |
593 | new PropertyScrambler<SceneObjectPart>() | 591 | new PropertyScrambler<SceneObjectPart>() |
@@ -663,7 +661,7 @@ namespace OpenSim.Data.Tests | |||
663 | [Test] | 661 | [Test] |
664 | public void T020_PrimInventoryEmpty() | 662 | public void T020_PrimInventoryEmpty() |
665 | { | 663 | { |
666 | TestHelper.InMethod(); | 664 | TestHelpers.InMethod(); |
667 | 665 | ||
668 | SceneObjectGroup sog = GetMySOG("object1"); | 666 | SceneObjectGroup sog = GetMySOG("object1"); |
669 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); | 667 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); |
@@ -687,7 +685,7 @@ namespace OpenSim.Data.Tests | |||
687 | [Test] | 685 | [Test] |
688 | public void T021_PrimInventoryBasic() | 686 | public void T021_PrimInventoryBasic() |
689 | { | 687 | { |
690 | TestHelper.InMethod(); | 688 | TestHelpers.InMethod(); |
691 | 689 | ||
692 | SceneObjectGroup sog = GetMySOG("object1"); | 690 | SceneObjectGroup sog = GetMySOG("object1"); |
693 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); | 691 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); |
@@ -727,7 +725,7 @@ namespace OpenSim.Data.Tests | |||
727 | [Test] | 725 | [Test] |
728 | public void T025_PrimInventoryPersistency() | 726 | public void T025_PrimInventoryPersistency() |
729 | { | 727 | { |
730 | TestHelper.InMethod(); | 728 | TestHelpers.InMethod(); |
731 | 729 | ||
732 | InventoryItemBase i = new InventoryItemBase(); | 730 | InventoryItemBase i = new InventoryItemBase(); |
733 | UUID id = UUID.Random(); | 731 | UUID id = UUID.Random(); |
@@ -800,7 +798,7 @@ namespace OpenSim.Data.Tests | |||
800 | [ExpectedException(typeof(ArgumentException))] | 798 | [ExpectedException(typeof(ArgumentException))] |
801 | public void T026_PrimInventoryMany() | 799 | public void T026_PrimInventoryMany() |
802 | { | 800 | { |
803 | TestHelper.InMethod(); | 801 | TestHelpers.InMethod(); |
804 | 802 | ||
805 | UUID i1,i2,i3,i4; | 803 | UUID i1,i2,i3,i4; |
806 | i1 = UUID.Random(); | 804 | i1 = UUID.Random(); |
@@ -832,7 +830,7 @@ namespace OpenSim.Data.Tests | |||
832 | [Test] | 830 | [Test] |
833 | public void T052_RemoveObject() | 831 | public void T052_RemoveObject() |
834 | { | 832 | { |
835 | TestHelper.InMethod(); | 833 | TestHelpers.InMethod(); |
836 | 834 | ||
837 | db.RemoveObject(prim1, region1); | 835 | db.RemoveObject(prim1, region1); |
838 | SceneObjectGroup sog = FindSOG("object1", region1); | 836 | SceneObjectGroup sog = FindSOG("object1", region1); |
@@ -842,7 +840,7 @@ namespace OpenSim.Data.Tests | |||
842 | [Test] | 840 | [Test] |
843 | public void T100_DefaultRegionInfo() | 841 | public void T100_DefaultRegionInfo() |
844 | { | 842 | { |
845 | TestHelper.InMethod(); | 843 | TestHelpers.InMethod(); |
846 | 844 | ||
847 | RegionSettings r1 = db.LoadRegionSettings(region1); | 845 | RegionSettings r1 = db.LoadRegionSettings(region1); |
848 | Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))"); | 846 | Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))"); |
@@ -854,7 +852,7 @@ namespace OpenSim.Data.Tests | |||
854 | [Test] | 852 | [Test] |
855 | public void T101_UpdateRegionInfo() | 853 | public void T101_UpdateRegionInfo() |
856 | { | 854 | { |
857 | TestHelper.InMethod(); | 855 | TestHelpers.InMethod(); |
858 | 856 | ||
859 | int agentlimit = random.Next(); | 857 | int agentlimit = random.Next(); |
860 | double objectbonus = random.Next(); | 858 | double objectbonus = random.Next(); |
@@ -960,7 +958,7 @@ namespace OpenSim.Data.Tests | |||
960 | [Test] | 958 | [Test] |
961 | public void T300_NoTerrain() | 959 | public void T300_NoTerrain() |
962 | { | 960 | { |
963 | TestHelper.InMethod(); | 961 | TestHelpers.InMethod(); |
964 | 962 | ||
965 | Assert.That(db.LoadTerrain(zero), Is.Null); | 963 | Assert.That(db.LoadTerrain(zero), Is.Null); |
966 | Assert.That(db.LoadTerrain(region1), Is.Null); | 964 | Assert.That(db.LoadTerrain(region1), Is.Null); |
@@ -971,7 +969,7 @@ namespace OpenSim.Data.Tests | |||
971 | [Test] | 969 | [Test] |
972 | public void T301_CreateTerrain() | 970 | public void T301_CreateTerrain() |
973 | { | 971 | { |
974 | TestHelper.InMethod(); | 972 | TestHelpers.InMethod(); |
975 | 973 | ||
976 | double[,] t1 = GenTerrain(height1); | 974 | double[,] t1 = GenTerrain(height1); |
977 | db.StoreTerrain(t1, region1); | 975 | db.StoreTerrain(t1, region1); |
@@ -985,7 +983,7 @@ namespace OpenSim.Data.Tests | |||
985 | [Test] | 983 | [Test] |
986 | public void T302_FetchTerrain() | 984 | public void T302_FetchTerrain() |
987 | { | 985 | { |
988 | TestHelper.InMethod(); | 986 | TestHelpers.InMethod(); |
989 | 987 | ||
990 | double[,] baseterrain1 = GenTerrain(height1); | 988 | double[,] baseterrain1 = GenTerrain(height1); |
991 | double[,] baseterrain2 = GenTerrain(height2); | 989 | double[,] baseterrain2 = GenTerrain(height2); |
@@ -997,7 +995,7 @@ namespace OpenSim.Data.Tests | |||
997 | [Test] | 995 | [Test] |
998 | public void T303_UpdateTerrain() | 996 | public void T303_UpdateTerrain() |
999 | { | 997 | { |
1000 | TestHelper.InMethod(); | 998 | TestHelpers.InMethod(); |
1001 | 999 | ||
1002 | double[,] baseterrain1 = GenTerrain(height1); | 1000 | double[,] baseterrain1 = GenTerrain(height1); |
1003 | double[,] baseterrain2 = GenTerrain(height2); | 1001 | double[,] baseterrain2 = GenTerrain(height2); |
@@ -1011,7 +1009,7 @@ namespace OpenSim.Data.Tests | |||
1011 | [Test] | 1009 | [Test] |
1012 | public void T400_EmptyLand() | 1010 | public void T400_EmptyLand() |
1013 | { | 1011 | { |
1014 | TestHelper.InMethod(); | 1012 | TestHelpers.InMethod(); |
1015 | 1013 | ||
1016 | Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))"); | 1014 | Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))"); |
1017 | Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))"); | 1015 | Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))"); |