mirror of https://github.com/ErsatzTV/ErsatzTV.git
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.
37 lines
857 B
37 lines
857 B
using ErsatzTV.Core.Domain; |
|
using FluentAssertions; |
|
using NUnit.Framework; |
|
|
|
namespace ErsatzTV.Core.Tests.Domain; |
|
|
|
[TestFixture] |
|
public class PlayoutItemTests |
|
{ |
|
[Test] |
|
public void GetDisplayDuration_ShortDuration() |
|
{ |
|
var item = new PlayoutItem |
|
{ |
|
Start = DateTime.UtcNow.Date, |
|
Finish = DateTime.UtcNow.Date.AddHours(3).AddMinutes(5).AddSeconds(4) |
|
}; |
|
|
|
string actual = item.GetDisplayDuration(); |
|
|
|
actual.Should().Be("3:05:04"); |
|
} |
|
|
|
[Test] |
|
public void GetDisplayDuration_LongDuration() |
|
{ |
|
var item = new PlayoutItem |
|
{ |
|
Start = DateTime.UtcNow.Date, |
|
Finish = DateTime.UtcNow.Date.AddHours(27).AddMinutes(5).AddSeconds(4) |
|
}; |
|
|
|
string actual = item.GetDisplayDuration(); |
|
|
|
actual.Should().Be("27:05:04"); |
|
} |
|
}
|
|
|