* add chapter statistics and new filler options * refactor playout builder * more refactor prep for filler * rewrite schedulers * refactor collectionkey * add tail filler kind * migrate tail filler to filler preset * optionally show filler * fix playout detail row count * remove duration tail filler options * implement tail and fallback in flood scheduler * implement tail and fallback in one scheduler * implement tail and fallback in multiple scheduler * implement looping fallback filler * more duration tests * start to add post-roll filler to flood * rework playoutitem filler tagging * rework scheduler logging * calculate whether configured filler will fit * implement pre-roll and post-roll duration and count filler * improve duration filler calculation * add minutes to search index * update channel guide to work with new filler * add mid-roll filler * don't clone enumerators for filler calculations * support pre-roll and post-roll pad filler * implement mid-roll pad filler * allow clearing filler selections in schedule editor * fix tests * filler config validation * use consistent time zone for tests
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using ErsatzTV.Core.Domain;
|
|
using ErsatzTV.Core.Interfaces.Metadata;
|
|
using ErsatzTV.Core.Interfaces.Repositories;
|
|
using ErsatzTV.Core.Metadata;
|
|
using FluentAssertions;
|
|
using Microsoft.Extensions.Logging;
|
|
using Moq;
|
|
using NUnit.Framework;
|
|
|
|
namespace ErsatzTV.Core.Tests.Metadata
|
|
{
|
|
[TestFixture]
|
|
public class LocalStatisticsProviderTests
|
|
{
|
|
[Test]
|
|
// this needs to be a culture where '.' is a group separator
|
|
[SetCulture("it-IT")]
|
|
public void Test()
|
|
{
|
|
var provider = new LocalStatisticsProvider(
|
|
new Mock<IMetadataRepository>().Object,
|
|
new Mock<ILocalFileSystem>().Object,
|
|
new Mock<ILogger<LocalStatisticsProvider>>().Object);
|
|
|
|
var input = new LocalStatisticsProvider.FFprobe(
|
|
new LocalStatisticsProvider.FFprobeFormat("123.45"),
|
|
new List<LocalStatisticsProvider.FFprobeStream>(),
|
|
new List<LocalStatisticsProvider.FFprobeChapter>());
|
|
|
|
MediaVersion result = provider.ProjectToMediaVersion("test", input);
|
|
|
|
result.Duration.Should().Be(TimeSpan.FromSeconds(123.45));
|
|
}
|
|
}
|
|
}
|