diff options
author | lbsa71 | 2009-05-27 11:54:17 +0000 |
---|---|---|
committer | lbsa71 | 2009-05-27 11:54:17 +0000 |
commit | 892406248ab6452871fa8ac74c8c8b856feee070 (patch) | |
tree | 9a7345d58d1027e9194fede31bb50ad91a0cd655 /OpenSim/Server/Handlers/Tests | |
parent | Catching weirdnesses on resolving External EndPoint in agent transfers. Will ... (diff) | |
download | opensim-SC_OLD-892406248ab6452871fa8ac74c8c8b856feee070.zip opensim-SC_OLD-892406248ab6452871fa8ac74c8c8b856feee070.tar.gz opensim-SC_OLD-892406248ab6452871fa8ac74c8c8b856feee070.tar.bz2 opensim-SC_OLD-892406248ab6452871fa8ac74c8c8b856feee070.tar.xz |
* Added OpenSim.Server.Handlers.Tests project
* Added AssetServerGetHandlerTests - not really wired up yet; more to come.
* Ignored some gens
Diffstat (limited to 'OpenSim/Server/Handlers/Tests')
-rw-r--r-- | OpenSim/Server/Handlers/Tests/Asset/AssetServerGetHandlerTests.cs | 103 |
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 @@ | |||
1 | using NUnit.Framework; | ||
2 | using OpenSim.Framework; | ||
3 | using OpenSim.Framework.Servers.HttpServer; | ||
4 | using OpenSim.Server.Handlers.Asset; | ||
5 | using OpenSim.Services.Interfaces; | ||
6 | using OpenSim.Tests.Common; | ||
7 | using OpenSim.Tests.Common.Mock; | ||
8 | using OpenSim.Tests.Common.Setup; | ||
9 | |||
10 | namespace 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 | ||