public async Task LoadFrom_NoFoundSeries_Fails()
        {
            var loader = new TvDbSeriesFromEmbyData(_tvDbClient, _sources);

            var result = await loader.LoadFrom(_embyItemData);

            result.IsLeft.Should().BeTrue();
            result.IfLeft(f => f.Reason.Should().Be("Failed to find series in TvDb"));
        }
        public async Task LoadFrom_CreatesSourceData()
        {
            var tvDbSeriesData = TvDbTestData.Series(22, "SeriesName");

            _tvDbClient.FindSeriesAsync("SeriesName").Returns(tvDbSeriesData);

            var loader = new TvDbSeriesFromEmbyData(_tvDbClient, _sources);

            var result = await loader.LoadFrom(_embyItemData);

            result.IsRight.Should().BeTrue();

            result.IfRight(sd => sd.Data.Should().Be(tvDbSeriesData));
            result.IfRight(sd => sd.Source.Should().Be(_sources.TvDb));
            result.IfRight(sd =>
                           sd.Identifier.Should().BeEquivalentTo(new ItemIdentifier(2, Option <int> .None, "SeriesName")));
        }
        public void CanLoadFrom_Null_IsFalse()
        {
            var loader = new TvDbSeriesFromEmbyData(_tvDbClient, _sources);

            loader.CanLoadFrom(null).Should().BeFalse();
        }
        public void CanLoadFrom_WrongItemType_IsFalse()
        {
            var loader = new TvDbSeriesFromEmbyData(_tvDbClient, _sources);

            loader.CanLoadFrom(MediaItemTypes.Season).Should().BeFalse();
        }
        public void CanLoadFrom_CorrectItemType_IsTrue()
        {
            var loader = new TvDbSeriesFromEmbyData(_tvDbClient, _sources);

            loader.CanLoadFrom(MediaItemTypes.Series).Should().BeTrue();
        }