aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Tests/UtilTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Tests/UtilTest.cs')
-rw-r--r--OpenSim/Framework/Tests/UtilTest.cs23
1 files changed, 12 insertions, 11 deletions
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
214 214
215 for (int i = 0; i < contenttypes.Length; i++) 215 for (int i = 0; i < contenttypes.Length; i++)
216 { 216 {
217 int expected; 217 if (SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == 18)
218 if (contenttypes[i] == "image/tga") 218 {
219 expected = 12; // if we know only the content-type "image/tga", then we assume the asset type is TextureTGA; not ImageTGA 219 Assert.That(contenttypes[i] == "image/tga");
220 }
220 else 221 else
221 expected = assettypes[i]; 222 {
222 Assert.AreEqual(expected, SLUtil.ContentTypeToSLAssetType(contenttypes[i]), 223 Assert.That(SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == assettypes[i],
223 String.Format("Incorrect AssetType mapped from Content-Type {0}", contenttypes[i])); 224 "Expecting {0} but got {1}", assettypes[i],
225 SLUtil.ContentTypeToSLAssetType(contenttypes[i]));
226 }
224 } 227 }
225 228
226 int[] inventorytypes = new int[] {-1,0,1,2,3,6,7,8,9,10,15,17,18,20}; 229 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
234 "application/vnd.ll.primitive", 237 "application/vnd.ll.primitive",
235 "application/vnd.ll.notecard", 238 "application/vnd.ll.notecard",
236 "application/vnd.ll.folder", 239 "application/vnd.ll.folder",
237 "application/vnd.ll.rootfolder", 240 "application/octet-stream",
238 "application/vnd.ll.lsltext", 241 "application/vnd.ll.lsltext",
239 "image/x-j2c", 242 "image/x-j2c",
240 "application/vnd.ll.primitive", 243 "application/vnd.ll.primitive",
@@ -244,8 +247,7 @@ namespace OpenSim.Framework.Tests
244 247
245 for (int i=0;i<inventorytypes.Length;i++) 248 for (int i=0;i<inventorytypes.Length;i++)
246 { 249 {
247 Assert.AreEqual(invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]), 250 Assert.That(SLUtil.SLInvTypeToContentType(inventorytypes[i]) == invcontenttypes[i], "Expected {0}, Got {1}", invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]));
248 String.Format("Incorrect Content-Type mapped from InventoryType {0}", inventorytypes[i]));
249 } 251 }
250 252
251 invcontenttypes = new string[] 253 invcontenttypes = new string[]
@@ -278,8 +280,7 @@ namespace OpenSim.Framework.Tests
278 280
279 for (int i = 0; i < invtypes.Length; i++) 281 for (int i = 0; i < invtypes.Length; i++)
280 { 282 {
281 Assert.AreEqual(invtypes[i], SLUtil.ContentTypeToSLInvType(invcontenttypes[i]), 283 Assert.That(SLUtil.ContentTypeToSLInvType(invcontenttypes[i]) == invtypes[i], "Expected {0}, Got {1}", invtypes[i], SLUtil.ContentTypeToSLInvType(invcontenttypes[i]));
282 String.Format("Incorrect InventoryType mapped from Content-Type {0}", invcontenttypes[i]));
283 } 284 }
284 } 285 }
285 } 286 }