diff options
author | Justin Clarke Casey | 2009-01-23 20:38:44 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-23 20:38:44 +0000 |
commit | dbd2b4523319758c8c0e093a89be8bcb9b2e4ee1 (patch) | |
tree | 2dea0b57cbb6ffacf263c81d4689777753e2746b /OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs | |
parent | Thank you kindly, TLaukkan (Tommil) for a patch that: (diff) | |
download | opensim-SC_OLD-dbd2b4523319758c8c0e093a89be8bcb9b2e4ee1.zip opensim-SC_OLD-dbd2b4523319758c8c0e093a89be8bcb9b2e4ee1.tar.gz opensim-SC_OLD-dbd2b4523319758c8c0e093a89be8bcb9b2e4ee1.tar.bz2 opensim-SC_OLD-dbd2b4523319758c8c0e093a89be8bcb9b2e4ee1.tar.xz |
* Write a simple archive loading test which doesn't actually do any testing yet apart from not blow up
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs index db296b0..4f4f53c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver.Tests | |||
40 | public class ArchiverTests | 40 | public class ArchiverTests |
41 | { | 41 | { |
42 | /// <summary> | 42 | /// <summary> |
43 | /// Test saving a V0.2 OpenSim Region Archive. Does not yet do what it says on the tin | 43 | /// Test saving a V0.2 OpenSim Region Archive. |
44 | /// </summary> | 44 | /// </summary> |
45 | [Test] | 45 | [Test] |
46 | public void TestSaveOarV0p2() | 46 | public void TestSaveOarV0p2() |
@@ -76,5 +76,29 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver.Tests | |||
76 | 76 | ||
77 | // TODO: Test presence of more files and contents of files. | 77 | // TODO: Test presence of more files and contents of files. |
78 | } | 78 | } |
79 | |||
80 | /// <summary> | ||
81 | /// Test loading a V0.2 OpenSim Region Archive. Does not yet do what it says on the tin. | ||
82 | /// </summary> | ||
83 | [Test] | ||
84 | public void TestLoadOarV0p2() | ||
85 | { | ||
86 | MemoryStream archiveWriteStream = new MemoryStream(); | ||
87 | TarArchiveWriter tar = new TarArchiveWriter(); | ||
88 | |||
89 | tar.AddFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); | ||
90 | tar.WriteTar(archiveWriteStream); | ||
91 | |||
92 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); | ||
93 | |||
94 | ArchiverModule archiverModule = new ArchiverModule(); | ||
95 | |||
96 | Scene scene = SceneSetupHelpers.SetupScene(); | ||
97 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | ||
98 | |||
99 | archiverModule.DearchiveRegion(archiveReadStream); | ||
100 | |||
101 | // TODO: Okay, so nothing is tested yet apart from the fact that it doesn't blow up | ||
102 | } | ||
79 | } | 103 | } |
80 | } \ No newline at end of file | 104 | } \ No newline at end of file |