You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
940 B
27 lines
940 B
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Common;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using System.IO;
|
|
|
|
namespace NzbDrone.Core.Test.ProviderTests.DiskProviderTests
|
|
{
|
|
[TestFixture]
|
|
public class ExtractArchiveFixture : CoreTest
|
|
{
|
|
[Test]
|
|
public void Should_extract_to_correct_folder()
|
|
{
|
|
var destination = Path.Combine(TempFolder, "destination");
|
|
Mocker.Resolve<ArchiveProvider>().ExtractArchive(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);
|
|
}
|
|
}
|
|
}
|