diff options
author | lbsa71 | 2009-05-08 15:44:35 +0000 |
---|---|---|
committer | lbsa71 | 2009-05-08 15:44:35 +0000 |
commit | 54b5346f16ace21bad12c58500bbaa6e1739608e (patch) | |
tree | 353f94d07a7061c35f175247e2d3350e060d309b /OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs | |
parent | another possible cause of some of the inventory wierdness is the 1/2 implemented (diff) | |
download | opensim-SC-54b5346f16ace21bad12c58500bbaa6e1739608e.zip opensim-SC-54b5346f16ace21bad12c58500bbaa6e1739608e.tar.gz opensim-SC-54b5346f16ace21bad12c58500bbaa6e1739608e.tar.bz2 opensim-SC-54b5346f16ace21bad12c58500bbaa6e1739608e.tar.xz |
* Extracted common superclass for GetAssetStreamHandler and CachedGetAssetStreamHandler
* Added some more tests
Diffstat (limited to 'OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs')
-rw-r--r-- | OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs b/OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs index 4052920..7e91fde 100644 --- a/OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs +++ b/OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs | |||
@@ -40,5 +40,18 @@ namespace OpenSim.Tests.Common | |||
40 | Assert.AreEqual(new string[] { "c", "d" }, handler.SplitParams(assetsPath + "/c/d"), "Failed on second segment."); | 40 | Assert.AreEqual(new string[] { "c", "d" }, handler.SplitParams(assetsPath + "/c/d"), "Failed on second segment."); |
41 | Assert.AreEqual(new string[] { "e", "f" }, handler.SplitParams(assetsPath + "/e/f/"), "Failed on trailing slash."); | 41 | Assert.AreEqual(new string[] { "e", "f" }, handler.SplitParams(assetsPath + "/e/f/"), "Failed on trailing slash."); |
42 | } | 42 | } |
43 | |||
44 | public static byte[] EmptyByteArray = new byte[] {}; | ||
45 | |||
46 | public static void BaseTestHandleNoParams(BaseGetAssetStreamHandler handler, string assetsPath) | ||
47 | { | ||
48 | Assert.AreEqual(EmptyByteArray, handler.Handle(assetsPath, null, null, null), "Failed on empty params."); | ||
49 | Assert.AreEqual(EmptyByteArray, handler.Handle(assetsPath + "/", null, null, null), "Failed on single slash."); | ||
50 | } | ||
51 | |||
52 | public static void BaseTestHandleMalformedGuid(BaseGetAssetStreamHandler handler, string assetsPath) | ||
53 | { | ||
54 | Assert.AreEqual(EmptyByteArray, handler.Handle(assetsPath + "/badGuid", null, null, null), "Failed on bad guid."); | ||
55 | } | ||
43 | } | 56 | } |
44 | } | 57 | } |