diff options
* Added some more experimental code; nothing wired in so far.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Tests/AssetBaseTest.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs new file mode 100644 index 0000000..800b41b --- /dev/null +++ b/OpenSim/Framework/Tests/AssetBaseTest.cs | |||
@@ -0,0 +1,49 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using NUnit.Framework; | ||
5 | using OpenMetaverse; | ||
6 | |||
7 | namespace OpenSim.Framework.Tests | ||
8 | { | ||
9 | [TestFixture] | ||
10 | public class AssetBaseTest | ||
11 | { | ||
12 | [Test] | ||
13 | public void TestContainsReferences() | ||
14 | { | ||
15 | TestContainsReferences(AssetType.Bodypart, true); | ||
16 | TestContainsReferences(AssetType.Clothing, true); | ||
17 | |||
18 | TestContainsReferences(AssetType.Animation, false); | ||
19 | TestContainsReferences(AssetType.CallingCard, false); | ||
20 | TestContainsReferences(AssetType.Folder , false); | ||
21 | TestContainsReferences(AssetType.Gesture , false); | ||
22 | TestContainsReferences(AssetType.ImageJPEG , false); | ||
23 | TestContainsReferences(AssetType.ImageTGA , false); | ||
24 | TestContainsReferences(AssetType.Landmark , false); | ||
25 | TestContainsReferences(AssetType.LostAndFoundFolder, false); | ||
26 | TestContainsReferences(AssetType.LSLBytecode, false); | ||
27 | TestContainsReferences(AssetType.LSLText, false); | ||
28 | TestContainsReferences(AssetType.Notecard, false); | ||
29 | TestContainsReferences(AssetType.Object, false); | ||
30 | TestContainsReferences(AssetType.RootFolder, false); | ||
31 | TestContainsReferences(AssetType.Simstate, false); | ||
32 | TestContainsReferences(AssetType.SnapshotFolder, false); | ||
33 | TestContainsReferences(AssetType.Sound, false); | ||
34 | TestContainsReferences(AssetType.SoundWAV, false); | ||
35 | TestContainsReferences(AssetType.Texture, false); | ||
36 | TestContainsReferences(AssetType.TextureTGA, false); | ||
37 | TestContainsReferences(AssetType.TrashFolder, false); | ||
38 | TestContainsReferences(AssetType.Unknown, false); | ||
39 | } | ||
40 | |||
41 | private void TestContainsReferences(AssetType assetType, bool expected) | ||
42 | { | ||
43 | AssetBase asset = new AssetBase(); | ||
44 | asset.Type = (sbyte)assetType; | ||
45 | bool actual = asset.ContainsReferences; | ||
46 | Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+"."); | ||
47 | } | ||
48 | } | ||
49 | } | ||