blob: aa97f62b04c0c684559aa5b0a72a7c2662ea2b72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using OpenSim.Data;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Servers.Tests
{
[TestFixture]
public class CachedGetAssetStreamHandlerTests
{
private const string ASSETS_PATH = "/assets";
[Test]
public void TestConstructor()
{
TestHelper.InMethod();
CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
}
[Test]
public void TestGetParams()
{
TestHelper.InMethod();
CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
BaseRequestHandlerTestHelper.BaseTestGetParams(handler, ASSETS_PATH);
}
[Test]
public void TestSplitParams()
{
TestHelper.InMethod();
CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
BaseRequestHandlerTestHelper.BaseTestSplitParams(handler, ASSETS_PATH);
}
[Test]
public void TestHandleNoParams()
{
TestHelper.InMethod();
CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
BaseRequestHandlerTestHelper.BaseTestHandleNoParams(handler, ASSETS_PATH);
}
[Test]
public void TestHandleMalformedGuid()
{
TestHelper.InMethod();
CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
BaseRequestHandlerTestHelper.BaseTestHandleMalformedGuid(handler, ASSETS_PATH);
}
//[Test]
//public void TestHandleFetchMissingAsset()
//{
// byte[] emptyResult = new byte[] { };
// CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(null);
// Assert.AreEqual(new string[] { }, handler.Handle("/assets/badGuid", null, null, null), "Failed on bad guid.");
//}
}
}
|