aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
diff options
context:
space:
mode:
authorlbsa712009-05-08 15:44:35 +0000
committerlbsa712009-05-08 15:44:35 +0000
commit54b5346f16ace21bad12c58500bbaa6e1739608e (patch)
tree353f94d07a7061c35f175247e2d3350e060d309b /OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
parentanother possible cause of some of the inventory wierdness is the 1/2 implemented (diff)
downloadopensim-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/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs')
-rw-r--r--OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs72
1 files changed, 72 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
new file mode 100644
index 0000000..aa97f62
--- /dev/null
+++ b/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
@@ -0,0 +1,72 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using NUnit.Framework;
5using OpenSim.Data;
6using OpenSim.Framework.Servers.HttpServer;
7using OpenSim.Tests.Common;
8
9namespace OpenSim.Framework.Servers.Tests
10{
11 [TestFixture]
12 public class CachedGetAssetStreamHandlerTests
13 {
14 private const string ASSETS_PATH = "/assets";
15
16 [Test]
17 public void TestConstructor()
18 {
19 TestHelper.InMethod();
20
21 CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
22 }
23
24 [Test]
25 public void TestGetParams()
26 {
27 TestHelper.InMethod();
28
29 CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
30 BaseRequestHandlerTestHelper.BaseTestGetParams(handler, ASSETS_PATH);
31 }
32
33 [Test]
34 public void TestSplitParams()
35 {
36 TestHelper.InMethod();
37
38 CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
39 BaseRequestHandlerTestHelper.BaseTestSplitParams(handler, ASSETS_PATH);
40 }
41
42 [Test]
43 public void TestHandleNoParams()
44 {
45 TestHelper.InMethod();
46
47 CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
48
49 BaseRequestHandlerTestHelper.BaseTestHandleNoParams(handler, ASSETS_PATH);
50 }
51
52 [Test]
53 public void TestHandleMalformedGuid()
54 {
55 TestHelper.InMethod();
56
57 CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
58
59 BaseRequestHandlerTestHelper.BaseTestHandleMalformedGuid(handler, ASSETS_PATH);
60 }
61
62 //[Test]
63 //public void TestHandleFetchMissingAsset()
64 //{
65
66 // byte[] emptyResult = new byte[] { };
67 // CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
68
69 // Assert.AreEqual(new string[] { }, handler.Handle("/assets/badGuid", null, null, null), "Failed on bad guid.");
70 //}
71 }
72}