diff options
author | lbsa71 | 2009-04-09 16:45:22 +0000 |
---|---|---|
committer | lbsa71 | 2009-04-09 16:45:22 +0000 |
commit | d2a412e94bf3ef1e332d44b7106c606f26b1636b (patch) | |
tree | ba7535b2a55edf538e067d7ac72a1ee55943215e /OpenSim/Framework/Tests | |
parent | * Moved the DatabaseTestAttribute to Test.Common, and thus included ref to th... (diff) | |
download | opensim-SC_OLD-d2a412e94bf3ef1e332d44b7106c606f26b1636b.zip opensim-SC_OLD-d2a412e94bf3ef1e332d44b7106c606f26b1636b.tar.gz opensim-SC_OLD-d2a412e94bf3ef1e332d44b7106c606f26b1636b.tar.bz2 opensim-SC_OLD-d2a412e94bf3ef1e332d44b7106c606f26b1636b.tar.xz |
* Added some more experimental code; nothing wired in so far.
Diffstat (limited to 'OpenSim/Framework/Tests')
-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 | } | ||