aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Tests/Asset/AssetServerGetHandlerTests.cs103
1 files changed, 103 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Tests/Asset/AssetServerGetHandlerTests.cs b/OpenSim/Server/Handlers/Tests/Asset/AssetServerGetHandlerTests.cs
new file mode 100644
index 0000000..3636972
--- /dev/null
+++ b/OpenSim/Server/Handlers/Tests/Asset/AssetServerGetHandlerTests.cs
@@ -0,0 +1,103 @@
1using NUnit.Framework;
2using OpenSim.Framework;
3using OpenSim.Framework.Servers.HttpServer;
4using OpenSim.Server.Handlers.Asset;
5using OpenSim.Services.Interfaces;
6using OpenSim.Tests.Common;
7using OpenSim.Tests.Common.Mock;
8using OpenSim.Tests.Common.Setup;
9
10namespace OpenSim.Server.Handlers.Tests.Asset
11{
12 [TestFixture]
13 public class AssetServerGetHandlerTests
14 {
15 private const string ASSETS_PATH = "/assets";
16
17 [Test]
18 public void TestConstructor()
19 {
20 TestHelper.InMethod();
21
22 AssetServerGetHandler handler = new AssetServerGetHandler( null );
23 }
24
25 [Test]
26 public void TestGetParams()
27 {
28 TestHelper.InMethod();
29
30 AssetServerGetHandler handler = new AssetServerGetHandler(null);
31 BaseRequestHandlerTestHelper.BaseTestGetParams(handler, ASSETS_PATH);
32 }
33
34 [Test]
35 public void TestSplitParams()
36 {
37 TestHelper.InMethod();
38
39 AssetServerGetHandler handler = new AssetServerGetHandler(null);
40 BaseRequestHandlerTestHelper.BaseTestSplitParams(handler, ASSETS_PATH);
41 }
42
43 //[Test]
44 //public void TestHandleNoParams()
45 //{
46 // TestHelper.InMethod();
47
48 // AssetServerGetHandler handler = new AssetServerGetHandler(null);
49
50 // BaseRequestHandlerTestHelper.BaseTestHandleNoParams(handler, ASSETS_PATH);
51 //}
52
53 //[Test]
54 //public void TestHandleMalformedGuid()
55 //{
56 // TestHelper.InMethod();
57
58 // AssetServerGetHandler handler = new AssetServerGetHandler(null);
59
60 // BaseRequestHandlerTestHelper.BaseTestHandleMalformedGuid(handler, ASSETS_PATH);
61 //}
62
63 //[Test]
64 //public void TestHandleFetchMissingAsset()
65 //{
66 // IAssetService assetDataPlugin = new TestAssetDataPlugin();
67 // AssetServerGetHandler handler = new AssetServerGetHandler(assetDataPlugin);
68
69 // GetAssetStreamHandlerTestHelpers.BaseFetchMissingAsset(handler);
70 //}
71
72 //[Test]
73 //public void TestHandleFetchExistingAssetData()
74 //{
75 // AssetServerGetHandler handler;
76 // OSHttpResponse response;
77 // AssetBase asset = CreateTestEnvironment(out handler, out response);
78
79 // GetAssetStreamHandlerTestHelpers.BaseFetchExistingAssetDataTest(asset, handler, response);
80 //}
81
82 //[Test]
83 //public void TestHandleFetchExistingAssetXml()
84 //{
85 // AssetServerGetHandler handler;
86 // OSHttpResponse response;
87 // AssetBase asset = CreateTestEnvironment(out handler, out response);
88
89 // GetAssetStreamHandlerTestHelpers.BaseFetchExistingAssetXmlTest(asset, handler, response);
90 //}
91
92 private static AssetBase CreateTestEnvironment(out AssetServerGetHandler handler, out OSHttpResponse response)
93 {
94 AssetBase asset = GetAssetStreamHandlerTestHelpers.CreateCommonTestResources(out response);
95
96 IAssetService assetDataPlugin = new TestAssetService();
97 handler = new AssetServerGetHandler(assetDataPlugin);
98
99 assetDataPlugin.Store(asset);
100 return asset;
101 }
102 }
103} \ No newline at end of file