aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-08-27 22:42:40 +0100
committerJustin Clark-Casey (justincc)2012-08-27 22:42:40 +0100
commite90168c7382f7750faa001542652e2316841c961 (patch)
treedda645661be2091b65f3b76ace3128a97e8ca56c /OpenSim/Region/CoreModules/Scripting
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-e90168c7382f7750faa001542652e2316841c961.zip
opensim-SC_OLD-e90168c7382f7750faa001542652e2316841c961.tar.gz
opensim-SC_OLD-e90168c7382f7750faa001542652e2316841c961.tar.bz2
opensim-SC_OLD-e90168c7382f7750faa001542652e2316841c961.tar.xz
Add VectorRenderModuleTests.TestRepeatDraw()
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs59
1 files changed, 48 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs
index 9787c8c..f9b5a59 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs
@@ -45,31 +45,68 @@ using OpenSim.Tests.Common.Mock;
45namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests 45namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests
46{ 46{
47 [TestFixture] 47 [TestFixture]
48 public class VectorRenderModuleTests 48 public class VectorRenderModuleTests : OpenSimTestCase
49 { 49 {
50 Scene m_scene;
51 DynamicTextureModule m_dtm;
52 VectorRenderModule m_vrm;
53
54 [SetUp]
55 public void SetUp()
56 {
57 m_scene = new SceneHelpers().SetupScene();
58 m_dtm = new DynamicTextureModule();
59 m_vrm = new VectorRenderModule();
60 SceneHelpers.SetupSceneModules(m_scene, m_dtm, m_vrm);
61 }
62
50 [Test] 63 [Test]
51 public void TestDraw() 64 public void TestDraw()
52 { 65 {
53 TestHelpers.InMethod(); 66 TestHelpers.InMethod();
54 67
55 Scene scene = new SceneHelpers().SetupScene(); 68 SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene);
56 DynamicTextureModule dtm = new DynamicTextureModule();
57 VectorRenderModule vrm = new VectorRenderModule();
58 SceneHelpers.SetupSceneModules(scene, dtm, vrm);
59
60 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene);
61 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; 69 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
62 70
63 dtm.AddDynamicTextureData( 71 m_dtm.AddDynamicTextureData(
64 scene.RegionInfo.RegionID, 72 m_scene.RegionInfo.RegionID,
65 so.UUID, 73 so.UUID,
66 vrm.GetContentType(), 74 m_vrm.GetContentType(),
67 "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;", 75 "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;",
68 "", 76 "",
69 0); 77 0);
70 78
71
72 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); 79 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
73 } 80 }
81
82 [Test]
83 public void TestRepeatDraw()
84 {
85 TestHelpers.InMethod();
86
87 string dtText = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
88
89 SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene);
90
91 m_dtm.AddDynamicTextureData(
92 m_scene.RegionInfo.RegionID,
93 so.UUID,
94 m_vrm.GetContentType(),
95 dtText,
96 "",
97 0);
98
99 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
100
101 m_dtm.AddDynamicTextureData(
102 m_scene.RegionInfo.RegionID,
103 so.UUID,
104 m_vrm.GetContentType(),
105 dtText,
106 "",
107 0);
108
109 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
110 }
74 } 111 }
75} \ No newline at end of file 112} \ No newline at end of file