From 54b5346f16ace21bad12c58500bbaa6e1739608e Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 8 May 2009 15:44:35 +0000 Subject: * Extracted common superclass for GetAssetStreamHandler and CachedGetAssetStreamHandler * Added some more tests --- OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs') diff --git a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs index 157a883..091a944 100644 --- a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs +++ b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs @@ -11,7 +11,6 @@ namespace OpenSim.Framework.Servers.Tests [TestFixture] public class GetAssetStreamHandlerTests { - private static byte[] EmptyByteArray = new byte[] {}; private const string ASSETS_PATH = "/assets"; [Test] @@ -47,8 +46,7 @@ namespace OpenSim.Framework.Servers.Tests GetAssetStreamHandler handler = new GetAssetStreamHandler(null); - Assert.AreEqual(EmptyByteArray, handler.Handle(ASSETS_PATH, null, null, null), "Failed on empty params."); - Assert.AreEqual(EmptyByteArray, handler.Handle(ASSETS_PATH + "/", null, null, null), "Failed on single slash."); + BaseRequestHandlerTestHelper.BaseTestHandleNoParams(handler, ASSETS_PATH); } [Test] @@ -58,13 +56,12 @@ namespace OpenSim.Framework.Servers.Tests GetAssetStreamHandler handler = new GetAssetStreamHandler(null); - Assert.AreEqual(EmptyByteArray, handler.Handle(ASSETS_PATH + "/badGuid", null, null, null), "Failed on bad guid."); + BaseRequestHandlerTestHelper.BaseTestHandleMalformedGuid(handler, ASSETS_PATH); } //[Test] //public void TestHandleFetchMissingAsset() //{ - // byte[] emptyResult = new byte[] { }; // GetAssetStreamHandler handler = new GetAssetStreamHandler(null); -- cgit v1.1