aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs')
-rw-r--r--OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs86
1 files changed, 86 insertions, 0 deletions
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
new file mode 100644
index 0000000..f1881a1
--- /dev/null
+++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
@@ -0,0 +1,86 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using OpenSim.Framework;
30using OpenSim.Framework.Serialization.External;
31using OpenMetaverse;
32using OpenMetaverse.StructuredData;
33using NUnit.Framework;
34
35namespace OpenSim.Framework.Serialization.Tests
36{
37 [TestFixture]
38 public class LandDataSerializerTest
39 {
40 private LandData land;
41
42 [SetUp]
43 public void setup()
44 {
45 // setup LandData object
46 this.land = new LandData();
47 this.land.AABBMax = new Vector3(0, 0, 0);
48 this.land.AABBMin = new Vector3(128, 128, 128);
49 this.land.Area = 128;
50 this.land.AuctionID = 0;
51 this.land.AuthBuyerID = new UUID();
52 this.land.Category = ParcelCategory.Residential;
53 this.land.ClaimDate = 0;
54 this.land.ClaimPrice = 0;
55 this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50");
56 this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5");
57 this.land.GroupPrims = 0;
58 this.land.Description = "land data to test LandDataSerializer";
59 this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat);
60 this.land.LandingType = (byte)LandingType.Direct;
61 this.land.Name = "LandDataSerializerTest Land";
62 this.land.Status = ParcelStatus.Leased;
63 this.land.LocalID = 0;
64 this.land.MediaAutoScale = (byte)0x01;
65 this.land.MediaID = new UUID("d4452578-2f25-4b97-a81b-819af559cfd7");
66 this.land.MediaURL = "http://videos.opensimulator.org/bumblebee.mp4";
67 this.land.OwnerID = new UUID("1b8eedf9-6d15-448b-8015-24286f1756bf");
68 }
69
70 /// <summary>
71 /// </summary>
72 [Test]
73 public void TestLandDataSerializerSerializeTest()
74 {
75 string serialized = LandDataSerializer.Serialize(this.land);
76 Assert.That(serialized.Length > 0);
77 }
78
79 /// <summary>
80 /// </summary>
81 [Test]
82 public void TestLandDataSerializerDeserializeTest()
83 {
84 }
85 }
86}