Esempio n. 1
0
        public void CosntructorTestSuccessfull()
        {
            SeriesDetails target = new SeriesDetails(this.testExtractionPath, "en");

            Assert.Equal("en", target.Language);
            Assert.NotNull(target.Actors);
            Assert.NotNull(target.Banners);
            Assert.NotNull(target.Series);
        }
Esempio n. 2
0
        public void DeserializeBannersTest()
        {
            SeriesDetails target = new SeriesDetails(this.testExtractionPath, "en");
            Type targetType = typeof(SeriesDetails);
            var method = targetType.GetMethod("DeserializeBanners", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

            method.Invoke(target, new object[0]);

            Assert.NotNull(target.Banners);
            Assert.Equal(125, target.Banners.Count);
        }
Esempio n. 3
0
        public void DeserializeSeriesTest()
        {
            SeriesDetails target = new SeriesDetails(this.testExtractionPath, "en");
            Type targetType = typeof(SeriesDetails);
            var method = targetType.GetMethod("DeserializeSeries", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

            method.Invoke(target, new object[0]);

            Assert.NotNull(target.Series);
            Assert.Equal(83462, target.Series.Id);
            Assert.Equal("Castle (2009)", target.Series.Name);
            Assert.Equal(121, target.Series.Episodes.Count);
        }
Esempio n. 4
0
        public void DisposeTestSuccessfull()
        {
            SeriesDetails target = new SeriesDetails(this.testExtractionPath, "en");

            var dummyCall = target.Actors;
            dummyCall = null;

            target.Dispose();

            Assert.Equal(null, target.Language);
            Assert.Null(target.Actors);
            Assert.Null(target.Banners);
            Assert.Null(target.Series);
        }