Exemplo n.º 1
0
        public void GetFullSeriesByIdFailedNoMirror()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<SeriesDetails> taskResult = target.GetFullSeriesById(83462, null);

            Assert.Null(taskResult.Result);
        }
Exemplo n.º 2
0
        public void GetFullSeriesByIdTestSuccessfullWithDefaultLanguage()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<SeriesDetails> taskResult = target.GetFullSeriesById(83462, this.testMirror);
            SeriesDetails result = taskResult.Result;
            Episode firstEpisode = result.Series.Episodes.First(x => x.SeasonNumber == 1 && x.Number == 1);

            // check details
            Assert.Equal("en", result.Language);

            Assert.NotNull(result.Actors);
            Assert.Equal(9, result.Actors.Count);

            Assert.NotNull(result.Banners);
            Assert.True(result.Banners.Count > 10);

            // check series
            Assert.NotNull(result);
            Assert.Equal(83462, result.Series.Id);
            Assert.Equal("Castle (2009)", result.Series.Name);
            Assert.Equal("en", result.Series.Language);

            // check episodes
            Assert.Equal(1, firstEpisode.SeasonNumber);
            Assert.Equal(1, firstEpisode.Number);
            Assert.Equal(398671, firstEpisode.Id);
            Assert.Equal("Flowers for Your Grave", firstEpisode.Name);

            result.Dispose();
        }
Exemplo n.º 3
0
        public void GetFullSeriesByIdFailedNoId()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<SeriesDetails> taskResult = target.GetFullSeriesById(0, this.testMirror);

            Assert.Null(taskResult.Result);
        }
Exemplo n.º 4
0
        public void GetFullSeriesByIdFailedNoLanguage()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<SeriesDetails> taskResult = target.GetFullSeriesById(83462, string.Empty, this.testMirror);

            Assert.Null(taskResult.Result);
        }
Exemplo n.º 5
0
        public void GetFullSeriesByIdTestSuccessfullWithLanguage()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<SeriesDetails> taskResult = target.GetFullSeriesById(83462, "de", this.testMirror);
            SeriesDetails result = taskResult.Result;

            Assert.Equal("de", result.Language);

            Episode firstEpisode = result.Series.Episodes.First(x => x.SeasonNumber == 1 && x.Number == 1);

            // check series
            Assert.NotNull(result);
            Assert.Equal(83462, result.Series.Id);
            Assert.Equal("Castle", result.Series.Name);
            Assert.Equal("de", result.Series.Language);

            // check episodes
            Assert.Equal(1, firstEpisode.SeasonNumber);
            Assert.Equal(1, firstEpisode.Number);
            Assert.Equal(398671, firstEpisode.Id);
            Assert.Equal("Blumen für Dein Grab", firstEpisode.Name);

            result.Dispose();
        }
Exemplo n.º 6
0
        public void GetSeriesByRemoteIdTestFailedNoMirror()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Series>> taskResult = target.GetSeriesByRemoteId("tt0934814", string.Empty, string.Empty, null);

            Assert.Null(taskResult.Result);
        }
Exemplo n.º 7
0
        public void GetSeriesByRemoteIdTestSuccessfullZap2ItIdWithLanguage()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Series>> taskResult = target.GetSeriesByRemoteId(string.Empty, "EP00930779", "en", this.testMirror);
            List<Series> result = taskResult.Result;

            Assert.True(result.Count == 1);

            Series firstElement = result[0];
            Assert.Equal("en", firstElement.Language);
            Assert.Equal("Chuck", firstElement.Name);
            Assert.Equal("graphical/80348-g26.jpg", firstElement.Banner);
            Assert.Equal(new DateTime(2007, 09, 24), firstElement.FirstAired);
            Assert.Equal("tt0934814", firstElement.IMDBId);
            Assert.Equal("EP00930779", firstElement.Zap2ItId);
            Assert.Equal(80348, firstElement.Id);
        }
Exemplo n.º 8
0
        public void GetSeriesByNameTestSuccessfullWithNameAndLanguage()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Series>> taskResult = target.GetSeriesByName("Chuck", "en", this.testMirror);

            List<Series> result = taskResult.Result;

            Series firstElement = result[0];
            Assert.Equal("en", firstElement.Language);
            Assert.Equal("Chuck", firstElement.Name);
            Assert.Equal("graphical/80348-g26.jpg", firstElement.Banner);
            Assert.Equal(new DateTime(2007, 09, 24), firstElement.FirstAired);
            Assert.Equal("NBC", firstElement.Network);
            Assert.Equal("tt0934814", firstElement.IMDBId);
            Assert.Equal("EP00930779", firstElement.Zap2ItId);
            Assert.Equal(80348, firstElement.Id);
        }
Exemplo n.º 9
0
        public void GetSeriesByRemoteIdTestFailedNoId()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Series>> taskResult = target.GetSeriesByRemoteId(string.Empty, string.Empty, this.testMirror);

            Assert.Null(taskResult.Result);
        }
Exemplo n.º 10
0
 public void GetSeriesByNameTestFailedSeriesNameNoLanguage()
 {
     WebInterface target = new WebInterface(apiKey);
     Task<List<Series>> taskResult = target.GetSeriesByName("Hugo", string.Empty, this.testMirror);
     Assert.Null(taskResult.Result);
 }
Exemplo n.º 11
0
 public void GetSeriesByNameTestFailedSeriesNameLanguageNoMirror()
 {
     WebInterface target = new WebInterface(apiKey);
     Task<List<Series>> taskResult = target.GetSeriesByName("Hugo", "en", null);
     Assert.Null(taskResult.Result);
 }
Exemplo n.º 12
0
        public void GetMirrorsTestSuccesfull()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Mirror>> taskResult = target.GetMirrors();

            List<Mirror> result = taskResult.Result;

            Assert.True(result.Count > 0);
        }
Exemplo n.º 13
0
        public void GetLanguagesTestSuccessfullWithMirror()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Language>> taskResult = target.GetLanguages(this.testMirror);

            List<Language> result = taskResult.Result;

            Assert.True(result.Count > 0);
        }
Exemplo n.º 14
0
        public void GetLanguagesTestFailedNoMirror()
        {
            WebInterface target = new WebInterface(apiKey);
            Task<List<Language>> taskResult = target.GetLanguages(null);

            Assert.Null(taskResult.Result);
        }