aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Archiver/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/Tests')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs26
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