mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Revert "Added full namespace to Xbmc Metadata tests"
This reverts commit bc4779f9da
.
This commit is contained in:
parent
bc4779f9da
commit
f338ada2d8
@ -123,14 +123,14 @@ private void WithMultiEpisodeFile()
|
||||
public void should_not_blowup()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_call_diskprovider_writeAllText_once_for_single_episode()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ public void should_call_diskprovider_writeAllText_once_for_single_episode()
|
||||
public void should_call_diskprovider_writeAllText_once_for_multi_episode()
|
||||
{
|
||||
WithMultiEpisodeFile();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ public void should_call_diskprovider_writeAllText_once_for_multi_episode()
|
||||
public void should_download_thumbnail_when_thumbnail_path_is_not_null()
|
||||
{
|
||||
WithSingleEpisodeFile();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForEpisodeFile(episodeFile, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ private void WithSpecials()
|
||||
[Test]
|
||||
public void should_not_blowup()
|
||||
{
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_call_diskprovider_writeAllText()
|
||||
{
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ public void should_download_poster_when_useBanners_is_false()
|
||||
public void should_download_banner_when_useBanners_is_true()
|
||||
{
|
||||
WithUseBanners();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ public void should_download_season_poster_when_useBanners_is_false()
|
||||
public void should_download_season_banner_when_useBanners_is_true()
|
||||
{
|
||||
WithUseBanners();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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 @@ public void should_download_special_thumb_with_proper_name()
|
||||
{
|
||||
WithUseBanners();
|
||||
WithSpecials();
|
||||
Mocker.Resolve<Core.Providers.Metadata.Xbmc>().CreateForSeries(series, tvdbSeries);
|
||||
Mocker.Resolve<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 New Issue
Block a user