diff options
author | Justin Clark-Casey (justincc) | 2012-01-26 00:10:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-26 00:10:37 +0000 |
commit | 55c6cbabfd04599030548983f376f60acdf607e7 (patch) | |
tree | acb78bec49b2b92beaf4bb8bfa691c0e43308f52 /OpenSim/Data | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-55c6cbabfd04599030548983f376f60acdf607e7.zip opensim-SC_OLD-55c6cbabfd04599030548983f376f60acdf607e7.tar.gz opensim-SC_OLD-55c6cbabfd04599030548983f376f60acdf607e7.tar.bz2 opensim-SC_OLD-55c6cbabfd04599030548983f376f60acdf607e7.tar.xz |
refactor: change RezScriptFromAgentInventory(), RezNewScript() and AddInventoryItem() to accept an agent id rather than a full IClientAPI.
This stops some code having to make spurious client == null checks and reduces regression test complexity.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/Tests/RegionTests.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index 1b93176..1d806fc 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs | |||
@@ -685,7 +685,7 @@ namespace OpenSim.Data.Tests | |||
685 | SceneObjectGroup sog = GetMySOG("object1"); | 685 | SceneObjectGroup sog = GetMySOG("object1"); |
686 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); | 686 | InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); |
687 | 687 | ||
688 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True); | 688 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True); |
689 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); | 689 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); |
690 | Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))"); | 690 | Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))"); |
691 | 691 | ||
@@ -762,7 +762,7 @@ namespace OpenSim.Data.Tests | |||
762 | i.CreationDate = creationd; | 762 | i.CreationDate = creationd; |
763 | 763 | ||
764 | SceneObjectGroup sog = GetMySOG("object1"); | 764 | SceneObjectGroup sog = GetMySOG("object1"); |
765 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True); | 765 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True); |
766 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id); | 766 | TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id); |
767 | 767 | ||
768 | Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))"); | 768 | Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))"); |
@@ -807,10 +807,10 @@ namespace OpenSim.Data.Tests | |||
807 | 807 | ||
808 | SceneObjectGroup sog = FindSOG("object1", region1); | 808 | SceneObjectGroup sog = FindSOG("object1", region1); |
809 | 809 | ||
810 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib1, zero), Is.True); | 810 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib1, zero), Is.True); |
811 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib2, zero), Is.True); | 811 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib2, zero), Is.True); |
812 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib3, zero), Is.True); | 812 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib3, zero), Is.True); |
813 | Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib4, zero), Is.True); | 813 | Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib4, zero), Is.True); |
814 | 814 | ||
815 | TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1); | 815 | TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1); |
816 | Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))"); | 816 | Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))"); |