aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs')
-rw-r--r--OpenSim/Tests/Common/BaseRequestHandlerTestHelper.cs13
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}