public void LocalApplyArchive()
{
using (var tempDir = new TemporaryDirectory("0install-unit-tests"))
{
string tempFile = Path.Combine(tempDir, "archive.zip");
typeof(ArchiveExtractorTest).CopyEmbeddedToFile("testArchive.zip", tempFile);
var archive = new Archive();
using (var extractedDir = archive.LocalApply(tempFile, new SilentTaskHandler()))
File.Exists(Path.Combine(extractedDir, "symlink")).Should().BeTrue();
archive.MimeType.Should().Be(Archive.MimeTypeZip);
archive.Size.Should().Be(new FileInfo(tempFile).Length);
File.Exists(tempFile).Should().BeTrue(because: "Local reference file should not be removed");
}
}