Rework Tests for Music, Start TV Code Cleanup

This commit is contained in:
Qstick
2017-10-17 22:55:02 -04:00
parent 1688c0a8df
commit 42e25055a9
37 changed files with 227 additions and 980 deletions
@@ -1,8 +1,8 @@
using FluentAssertions;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Datastore.Extensions;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Music;
namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
{
@@ -14,12 +14,12 @@ namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
[TestCase(1, 100, 0)]
public void should_calcuate_expected_offset(int page, int pageSize, int expected)
{
var pagingSpec = new PagingSpec<Episode>
var pagingSpec = new PagingSpec<Album>
{
Page = page,
PageSize = pageSize,
SortDirection = SortDirection.Ascending,
SortKey = "AirDate"
SortKey = "ReleaseDate"
};
pagingSpec.PagingOffset().Should().Be(expected);
@@ -1,8 +1,8 @@
using FluentAssertions;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Datastore.Extensions;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Music;
namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
{
@@ -11,12 +11,12 @@ namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
[Test]
public void should_convert_default_to_asc()
{
var pagingSpec = new PagingSpec<Episode>
var pagingSpec = new PagingSpec<Album>
{
Page = 1,
PageSize = 10,
SortDirection = SortDirection.Default,
SortKey = "AirDate"
SortKey = "ReleaseDate"
};
pagingSpec.ToSortDirection().Should().Be(Marr.Data.QGen.SortDirection.Asc);
@@ -25,13 +25,13 @@ namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
[Test]
public void should_convert_ascending_to_asc()
{
var pagingSpec = new PagingSpec<Episode>
var pagingSpec = new PagingSpec<Album>
{
Page = 1,
PageSize = 10,
SortDirection = SortDirection.Ascending,
SortKey = "AirDate"
};
SortKey = "ReleaseDate"
};
pagingSpec.ToSortDirection().Should().Be(Marr.Data.QGen.SortDirection.Asc);
}
@@ -39,12 +39,12 @@ namespace NzbDrone.Core.Test.Datastore.PagingSpecExtensionsTests
[Test]
public void should_convert_descending_to_desc()
{
var pagingSpec = new PagingSpec<Episode>
var pagingSpec = new PagingSpec<Album>
{
Page = 1,
PageSize = 10,
SortDirection = SortDirection.Descending,
SortKey = "AirDate"
SortKey = "ReleaseDate"
};
pagingSpec.ToSortDirection().Should().Be(Marr.Data.QGen.SortDirection.Desc);