Exemplo n.º 1
0
        public void ReadTags()
        {
            bool gotLongDesc = false;
            bool gotPurdDate = false;

            Assert.AreEqual("Will Yapp", file.Tag.FirstPerformer);
            Assert.AreEqual("Why I Love Monty Python", file.Tag.Title);
            Assert.AreEqual(2008, file.Tag.Year);

            // Test Apple tags
            Mpeg4.AppleTag tag = (Mpeg4.AppleTag)file.GetTag(TagTypes.Apple, false);
            Assert.IsNotNull(tag);

            foreach (Mpeg4.AppleDataBox adbox in tag.DataBoxes(new ReadOnlyByteVector[] { BOXTYPE_LDES }))
            {
                Assert.AreEqual(LONG_DESC, adbox.Text);
                gotLongDesc = true;
            }

            foreach (Mpeg4.AppleDataBox adbox in tag.DataBoxes(new ReadOnlyByteVector[] { BOXTYPE_PURD }))
            {
                Assert.AreEqual(PURD_DATE, adbox.Text);
                gotPurdDate = true;
            }

            Assert.IsTrue(gotLongDesc);
            Assert.IsTrue(gotPurdDate);
        }
Exemplo n.º 2
0
        private void CheckTags(Mpeg4.AppleTag tag)
        {
            Assert.AreEqual("TEST title", tag.Title);
            Assert.AreEqual("TEST performer 1; TEST performer 2", tag.JoinedPerformers);
            Assert.AreEqual("TEST comment", tag.Comment);
            Assert.AreEqual("TEST copyright", tag.Copyright);
            Assert.AreEqual("TEST genre 1; TEST genre 2", tag.JoinedGenres);
            Assert.AreEqual(1999, tag.Year);

            Mpeg4.AppleTag atag = (Mpeg4.AppleTag)tag;
            Assert.IsNotNull(atag);

            foreach (Mpeg4.AppleDataBox adbox in atag.DataBoxes(new ReadOnlyByteVector[] { BOXTYPE_LDES }))
            {
                Assert.AreEqual("TEST Long Description", adbox.Text);
            }

            foreach (Mpeg4.AppleDataBox adbox in atag.DataBoxes(new ReadOnlyByteVector[] { BOXTYPE_TVSH }))
            {
                Assert.AreEqual("TEST TV Show", adbox.Text);
            }
        }