1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-28 02:27:13 +00:00
Lidarr/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/ArchiveProviderFixture.cs

27 lines
916 B
C#
Raw Normal View History

using FluentAssertions;
using NUnit.Framework;
2013-03-05 05:33:34 +00:00
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);
}
}
}