From ef1668adb3f1fe2294d1ce824752e0bc73ef67ac Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Apr 2012 21:42:32 +0100 Subject: Revert "Refactored how asset/inventory types are associated with content types: gathered all the knowledge into a single class. Added the Mesh content type." This reverts commit d3a4d67a207976cd0d116bb9021f7dfc896784e8. Accidentally committed this when I didn't mean to yet. --- OpenSim/Framework/Tests/UtilTest.cs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'OpenSim/Framework/Tests') diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index f0d2a3f..1ca35df 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs @@ -214,13 +214,16 @@ namespace OpenSim.Framework.Tests for (int i = 0; i < contenttypes.Length; i++) { - int expected; - if (contenttypes[i] == "image/tga") - expected = 12; // if we know only the content-type "image/tga", then we assume the asset type is TextureTGA; not ImageTGA + if (SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == 18) + { + Assert.That(contenttypes[i] == "image/tga"); + } else - expected = assettypes[i]; - Assert.AreEqual(expected, SLUtil.ContentTypeToSLAssetType(contenttypes[i]), - String.Format("Incorrect AssetType mapped from Content-Type {0}", contenttypes[i])); + { + Assert.That(SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == assettypes[i], + "Expecting {0} but got {1}", assettypes[i], + SLUtil.ContentTypeToSLAssetType(contenttypes[i])); + } } int[] inventorytypes = new int[] {-1,0,1,2,3,6,7,8,9,10,15,17,18,20}; @@ -234,7 +237,7 @@ namespace OpenSim.Framework.Tests "application/vnd.ll.primitive", "application/vnd.ll.notecard", "application/vnd.ll.folder", - "application/vnd.ll.rootfolder", + "application/octet-stream", "application/vnd.ll.lsltext", "image/x-j2c", "application/vnd.ll.primitive", @@ -244,8 +247,7 @@ namespace OpenSim.Framework.Tests for (int i=0;i