mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 09:47:39 +00:00
Added full namespace to Xbmc Metadata tests
This commit is contained in:
parent
7c803c4691
commit
bc4779f9da
2 changed files with 12 additions and 12 deletions
|
@ -123,14 +123,14 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
public void should_not_blowup()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_call_diskprovider_writeAllText_once_for_single_episode()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(episodeFile.Path.Replace("avi", "nfo"), It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
public void should_call_diskprovider_writeAllText_once_for_multi_episode()
|
||||
{
|
||||
WithMultiEpisodeFile();
|
||||
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(episodeFile.Path.Replace("avi", "nfo"), It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
public void should_download_thumbnail_when_thumbnail_path_is_not_null()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.Episodes.First().BannerPath, episodeFile.Path.Replace("avi", "tbn")), Times.Once());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,27 +106,27 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
[Test]
|
||||
public void should_not_blowup()
|
||||
{
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_call_diskprovider_writeAllText()
|
||||
{
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<DiskProvider>().Verify(v => v.WriteAllText(Path.Combine(series.Path, "tvshow.nfo"), It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_download_fanart()
|
||||
{
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.FanartPath, Path.Combine(series.Path, "fanart.jpg")), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_download_poster_when_useBanners_is_false()
|
||||
{
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.PosterPath, Path.Combine(series.Path, "folder.jpg")), Times.Once());
|
||||
}
|
||||
|
||||
|
@ -134,14 +134,14 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
public void should_download_banner_when_useBanners_is_true()
|
||||
{
|
||||
WithUseBanners();
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(tvdbSeries.BannerPath, Path.Combine(series.Path, "folder.jpg")), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_download_season_poster_when_useBanners_is_false()
|
||||
{
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => !s.Contains("banners")), It.IsRegex(@"season\d{2}\.tbn")), Times.Exactly(2));
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
public void should_download_season_banner_when_useBanners_is_true()
|
||||
{
|
||||
WithUseBanners();
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => s.Contains("banners")), It.IsRegex(@"season\d{2}\.tbn")), Times.Exactly(2));
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
{
|
||||
WithUseBanners();
|
||||
WithSpecials();
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.GetMock<BannerProvider>().Verify(v => v.Download(It.Is<string>(s => s.Contains("banners")), It.IsRegex(@"season-specials.tbn")), Times.Exactly(1));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue