mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
replaced our zip library so we can validate update package before applying.
This commit is contained in:
parent
8f0d3e2e3b
commit
635e206e03
11 changed files with 82 additions and 75 deletions
|
@ -0,0 +1,26 @@
|
|||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using System.IO;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.ProviderTests.DiskProviderTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ArchiveProviderFixture : TestBase<ArchiveService>
|
||||
{
|
||||
[Test]
|
||||
public void Should_extract_to_correct_folder()
|
||||
{
|
||||
var destination = Path.Combine(TempFolder, "destination");
|
||||
Subject.Extract(GetTestFilePath("TestArchive.zip"), destination);
|
||||
|
||||
var destinationFolder = new DirectoryInfo(destination);
|
||||
|
||||
destinationFolder.Exists.Should().BeTrue();
|
||||
destinationFolder.GetDirectories().Should().HaveCount(1);
|
||||
destinationFolder.GetDirectories("*", SearchOption.AllDirectories).Should().HaveCount(3);
|
||||
destinationFolder.GetFiles("*.*", SearchOption.AllDirectories).Should().HaveCount(6);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue