aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Tests/UtilTest.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2010-09-17 23:27:41 -0400
committerTeravus Ovares (Dan Olivares)2010-09-17 23:27:41 -0400
commit4d8387970423b240b4bb9e5cd0e4fd615f2d73fb (patch)
tree32ea0e2390494ff787a63f323f4617b2703db1fd /OpenSim/Framework/Tests/UtilTest.cs
parentClarify help text for use of file paths with console command "create region". (diff)
downloadopensim-SC-4d8387970423b240b4bb9e5cd0e4fd615f2d73fb.zip
opensim-SC-4d8387970423b240b4bb9e5cd0e4fd615f2d73fb.tar.gz
opensim-SC-4d8387970423b240b4bb9e5cd0e4fd615f2d73fb.tar.bz2
opensim-SC-4d8387970423b240b4bb9e5cd0e4fd615f2d73fb.tar.xz
* More Mundane Tests
* SL Util tests of AssetType2ContentType and ContentType2AssetType
Diffstat (limited to 'OpenSim/Framework/Tests/UtilTest.cs')
-rw-r--r--OpenSim/Framework/Tests/UtilTest.cs58
1 files changed, 58 insertions, 0 deletions
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs
index 45d822c..d04cbc6 100644
--- a/OpenSim/Framework/Tests/UtilTest.cs
+++ b/OpenSim/Framework/Tests/UtilTest.cs
@@ -170,5 +170,63 @@ namespace OpenSim.Framework.Tests
170 // Varying secrets should not eqal the same 170 // Varying secrets should not eqal the same
171 Assert.AreNotEqual(Util.GetHashGuid(string1, "secret1"), Util.GetHashGuid(string1, "secret2")); 171 Assert.AreNotEqual(Util.GetHashGuid(string1, "secret1"), Util.GetHashGuid(string1, "secret2"));
172 } 172 }
173
174 [Test]
175 public void SLUtilTests()
176 {
177 int[] assettypes = new int[]{-1,0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
178 ,23,24,25,46,47,48};
179 string[] contenttypes = new string[]
180 {
181 "application/octet-stream",
182 "image/x-j2c",
183 "audio/ogg",
184 "application/vnd.ll.callingcard",
185 "application/vnd.ll.landmark",
186 "application/vnd.ll.clothing",
187 "application/vnd.ll.primitive",
188 "application/vnd.ll.notecard",
189 "application/vnd.ll.folder",
190 "application/vnd.ll.rootfolder",
191 "application/vnd.ll.lsltext",
192 "application/vnd.ll.lslbyte",
193 "image/tga",
194 "application/vnd.ll.bodypart",
195 "application/vnd.ll.trashfolder",
196 "application/vnd.ll.snapshotfolder",
197 "application/vnd.ll.lostandfoundfolder",
198 "audio/x-wav",
199 "image/tga",
200 "image/jpeg",
201 "application/vnd.ll.animation",
202 "application/vnd.ll.gesture",
203 "application/x-metaverse-simstate",
204 "application/vnd.ll.favoritefolder",
205 "application/vnd.ll.link",
206 "application/vnd.ll.linkfolder",
207 "application/vnd.ll.currentoutfitfolder",
208 "application/vnd.ll.outfitfolder",
209 "application/vnd.ll.myoutfitsfolder"
210 };
211 for (int i=0;i<assettypes.Length;i++)
212 {
213 Assert.That(SLUtil.SLAssetTypeToContentType(assettypes[i]) == contenttypes[i], "Expecting {0} but got {1}", contenttypes[i], SLUtil.SLAssetTypeToContentType(assettypes[i]));
214 }
215
216 for (int i = 0; i < contenttypes.Length; i++)
217 {
218 if (SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == 18)
219 {
220 Assert.That(contenttypes[i] == "image/tga");
221 }
222 else
223 {
224 Assert.That(SLUtil.ContentTypeToSLAssetType(contenttypes[i]) == assettypes[i],
225 "Expecting {0} but got {1}", assettypes[i],
226 SLUtil.ContentTypeToSLAssetType(contenttypes[i]));
227 }
228 }
229
230 }
173 } 231 }
174} 232}