diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs index ee57aed..7080705 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests | |||
47 | { | 47 | { |
48 | protected TestScene m_scene; | 48 | protected TestScene m_scene; |
49 | protected MoapModule m_module; | 49 | protected MoapModule m_module; |
50 | 50 | ||
51 | [SetUp] | 51 | [SetUp] |
52 | public override void SetUp() | 52 | public override void SetUp() |
53 | { | 53 | { |
@@ -55,45 +55,45 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests | |||
55 | 55 | ||
56 | m_module = new MoapModule(); | 56 | m_module = new MoapModule(); |
57 | m_scene = new SceneHelpers().SetupScene(); | 57 | m_scene = new SceneHelpers().SetupScene(); |
58 | SceneHelpers.SetupSceneModules(m_scene, m_module); | 58 | SceneHelpers.SetupSceneModules(m_scene, m_module); |
59 | } | 59 | } |
60 | 60 | ||
61 | [Test] | 61 | [Test] |
62 | public void TestClearMediaUrl() | 62 | public void TestClearMediaUrl() |
63 | { | 63 | { |
64 | TestHelpers.InMethod(); | 64 | TestHelpers.InMethod(); |
65 | // log4net.Config.XmlConfigurator.Configure(); | 65 | // log4net.Config.XmlConfigurator.Configure(); |
66 | 66 | ||
67 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; | 67 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; |
68 | MediaEntry me = new MediaEntry(); | 68 | MediaEntry me = new MediaEntry(); |
69 | 69 | ||
70 | m_module.SetMediaEntry(part, 1, me); | 70 | m_module.SetMediaEntry(part, 1, me); |
71 | m_module.ClearMediaEntry(part, 1); | 71 | m_module.ClearMediaEntry(part, 1); |
72 | 72 | ||
73 | Assert.That(part.Shape.Media[1], Is.EqualTo(null)); | 73 | Assert.That(part.Shape.Media[1], Is.EqualTo(null)); |
74 | 74 | ||
75 | // Although we've cleared one face, other faces may still be present. So we need to check for an | 75 | // Although we've cleared one face, other faces may still be present. So we need to check for an |
76 | // update media url version | 76 | // update media url version |
77 | Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero)); | 77 | Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero)); |
78 | 78 | ||
79 | // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture. | 79 | // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture. |
80 | // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot. | 80 | // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot. |
81 | // Not at all confusing, eh? | 81 | // Not at all confusing, eh? |
82 | Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null); | 82 | Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null); |
83 | } | 83 | } |
84 | 84 | ||
85 | [Test] | 85 | [Test] |
86 | public void TestSetMediaUrl() | 86 | public void TestSetMediaUrl() |
87 | { | 87 | { |
88 | TestHelpers.InMethod(); | 88 | TestHelpers.InMethod(); |
89 | 89 | ||
90 | string homeUrl = "opensimulator.org"; | 90 | string homeUrl = "opensimulator.org"; |
91 | 91 | ||
92 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; | 92 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; |
93 | MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; | 93 | MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; |
94 | 94 | ||
95 | m_module.SetMediaEntry(part, 1, me); | 95 | m_module.SetMediaEntry(part, 1, me); |
96 | 96 | ||
97 | Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl)); | 97 | Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl)); |
98 | Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero)); | 98 | Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero)); |
99 | Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True); | 99 | Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True); |