Exemple #1
0
        public void Test_TraktExtendedInfo_ToString()
        {
            var extendedInfo = new TraktExtendedInfo();

            extendedInfo.ToString().Should().NotBeNull().And.BeEmpty();

            extendedInfo.SetMetadata();
            extendedInfo.ToString().Should().NotBeNull().And.Be("metadata");

            extendedInfo.SetFull();
            extendedInfo.ToString().Should().NotBeNull().And.Be("metadata,full");

            extendedInfo.SetNoSeasons();
            extendedInfo.ToString().Should().NotBeNull().And.Be("metadata,full,noseasons");

            extendedInfo.SetEpisodes();
            extendedInfo.ToString().Should().NotBeNull().And.Be("metadata,full,noseasons,episodes");
        }
Exemple #2
0
        public void Test_TraktExtendedInfo_SetEpisodes()
        {
            var extendedInfo = new TraktExtendedInfo();

            extendedInfo.SetEpisodes().Should().BeSameAs(extendedInfo);

            extendedInfo.Metadata.Should().BeFalse();
            extendedInfo.Full.Should().BeFalse();
            extendedInfo.NoSeasons.Should().BeFalse();
            extendedInfo.Episodes.Should().BeTrue();

            extendedInfo.ResetEpisodes().Should().BeSameAs(extendedInfo);

            extendedInfo.Metadata.Should().BeFalse();
            extendedInfo.Full.Should().BeFalse();
            extendedInfo.NoSeasons.Should().BeFalse();
            extendedInfo.Episodes.Should().BeFalse();
        }
Exemple #3
0
        public void Test_TraktExtendedInfo_Resolve()
        {
            var extendedInfo = new TraktExtendedInfo();

            extendedInfo.Resolve().Should().NotBeNull().And.BeEmpty();

            extendedInfo.SetMetadata();
            extendedInfo.Resolve().Should().NotBeNull().And.HaveCount(1).And.Contain("metadata");

            extendedInfo.SetFull();
            extendedInfo.Resolve().Should().NotBeNull().And.HaveCount(2).And.Contain("metadata", "full");

            extendedInfo.SetNoSeasons();
            extendedInfo.Resolve().Should().NotBeNull().And.HaveCount(3).And.Contain("metadata", "full", "noseasons");

            extendedInfo.SetEpisodes();
            extendedInfo.Resolve().Should().NotBeNull().And.HaveCount(4).And.Contain("metadata", "full", "noseasons", "episodes");
        }