mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
9cb220bf2a
Fall back to filesize check if mediainfo is not available Ubuntu package depends on sqlite3 and mediainfo New: mediainfo now used on mono to check runtime when available
32 lines
842 B
C#
32 lines
842 B
C#
using System.IO;
|
|
using FluentAssertions;
|
|
using Moq;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Common;
|
|
using NzbDrone.Core.MediaFiles.MediaInfo;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using NzbDrone.Test.Common.Categories;
|
|
|
|
namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
|
|
{
|
|
[TestFixture]
|
|
[DiskAccessTest]
|
|
public class VideoFileInfoReaderFixture : CoreTest<VideoFileInfoReader>
|
|
{
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
Mocker.GetMock<IDiskProvider>()
|
|
.Setup(s => s.FileExists(It.IsAny<string>()))
|
|
.Returns(true);
|
|
}
|
|
|
|
[Test]
|
|
public void get_runtime()
|
|
{
|
|
var path = Path.Combine(Directory.GetCurrentDirectory(), "Files", "Media", "H264_sample.mp4");
|
|
|
|
Subject.GetRunTime(path).Seconds.Should().Be(10);
|
|
}
|
|
}
|
|
} |