diff options
author | Justin Clark-Casey (justincc) | 2012-05-08 23:36:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-08 23:36:23 +0100 |
commit | ef279c5a62d15d29ca94c95418a13d52f2a68244 (patch) | |
tree | e2ada5a27d7503d46706a59ac3fe522fcd8f2922 /OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | |
parent | Add automated TestllCreateLink() (diff) | |
download | opensim-SC-ef279c5a62d15d29ca94c95418a13d52f2a68244.zip opensim-SC-ef279c5a62d15d29ca94c95418a13d52f2a68244.tar.gz opensim-SC-ef279c5a62d15d29ca94c95418a13d52f2a68244.tar.bz2 opensim-SC-ef279c5a62d15d29ca94c95418a13d52f2a68244.tar.xz |
Add automated TestllBreakLink()
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index 4420915..bc3b790 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | |||
@@ -108,5 +108,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
108 | Assert.That(grp1.Parts.Length, Is.EqualTo(4)); | 108 | Assert.That(grp1.Parts.Length, Is.EqualTo(4)); |
109 | Assert.That(grp2.IsDeleted, Is.True); | 109 | Assert.That(grp2.IsDeleted, Is.True); |
110 | } | 110 | } |
111 | |||
112 | [Test] | ||
113 | public void TestllBreakLink() | ||
114 | { | ||
115 | TestHelpers.InMethod(); | ||
116 | |||
117 | UUID ownerId = TestHelpers.ParseTail(0x1); | ||
118 | |||
119 | SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(2, ownerId, "grp1-", 0x10); | ||
120 | grp1.AbsolutePosition = new Vector3(10, 10, 10); | ||
121 | m_scene.AddSceneObject(grp1); | ||
122 | |||
123 | // FIXME: This should really be a script item (with accompanying script) | ||
124 | TaskInventoryItem grp1Item | ||
125 | = TaskInventoryHelpers.AddNotecard(m_scene, grp1.RootPart); | ||
126 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; | ||
127 | |||
128 | LSL_Api apiGrp1 = new LSL_Api(); | ||
129 | apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item); | ||
130 | |||
131 | apiGrp1.llBreakLink(2); | ||
132 | |||
133 | Assert.That(grp1.Parts.Length, Is.EqualTo(1)); | ||
134 | |||
135 | SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1"); | ||
136 | Assert.That(grp2, Is.Not.Null); | ||
137 | } | ||
111 | } | 138 | } |
112 | } \ No newline at end of file | 139 | } \ No newline at end of file |