2013-07-18 20:47:55 -07:00
|
|
|
using FizzWare.NBuilder;
|
2011-06-02 14:06:46 -07:00
|
|
|
using FluentAssertions;
|
|
|
|
using NUnit.Framework;
|
2013-02-18 22:01:03 -08:00
|
|
|
using NzbDrone.Core.Tv;
|
2011-05-18 20:55:35 -07:00
|
|
|
using NzbDrone.Core.Test.Framework;
|
2013-05-20 15:45:16 -07:00
|
|
|
using NzbDrone.Core.Tv.Events;
|
2011-05-22 09:53:21 -07:00
|
|
|
|
2013-09-12 23:47:40 -07:00
|
|
|
namespace NzbDrone.Core.Test.TvTests.SeriesServiceTests
|
2011-05-22 09:53:21 -07:00
|
|
|
{
|
|
|
|
[TestFixture]
|
2013-09-12 23:47:40 -07:00
|
|
|
public class AddSeriesFixture : CoreTest<SeriesService>
|
2011-05-22 09:53:21 -07:00
|
|
|
{
|
2013-02-19 18:05:15 -08:00
|
|
|
private Series fakeSeries;
|
|
|
|
|
2012-10-13 17:54:46 -07:00
|
|
|
[SetUp]
|
|
|
|
public void Setup()
|
|
|
|
{
|
2013-02-19 18:05:15 -08:00
|
|
|
fakeSeries = Builder<Series>.CreateNew().Build();
|
2012-10-13 17:54:46 -07:00
|
|
|
}
|
|
|
|
|
2013-05-20 15:45:16 -07:00
|
|
|
[Test]
|
|
|
|
public void series_added_event_should_have_proper_path()
|
2011-05-22 09:53:21 -07:00
|
|
|
{
|
2013-05-23 21:10:56 -07:00
|
|
|
fakeSeries.Path = null;
|
|
|
|
fakeSeries.RootFolderPath = @"C:\Test\TV";
|
2011-06-18 00:17:47 -07:00
|
|
|
|
2013-05-20 15:45:16 -07:00
|
|
|
var series = Subject.AddSeries(fakeSeries);
|
2011-06-18 00:17:47 -07:00
|
|
|
|
2013-05-23 21:10:56 -07:00
|
|
|
series.Path.Should().NotBeNull();
|
2011-06-18 00:17:47 -07:00
|
|
|
|
2013-05-20 15:45:16 -07:00
|
|
|
VerifyEventPublished<SeriesAddedEvent>();
|
2011-06-18 00:17:47 -07:00
|
|
|
}
|
|
|
|
|
2011-05-22 09:53:21 -07:00
|
|
|
}
|
2011-04-22 15:24:05 -07:00
|
|
|
} |