Esempio n. 1
0
        public void AddMethodShouldAppendNewValue()
        {
            var vorbisComment = new VorbisComment();

            vorbisComment.Add("ARTIST", "Aaron");
            vorbisComment.Add("ARTIST", "Lenoir");
            Assert.AreEqual(2, vorbisComment.Artist.Count);
            Assert.AreEqual("Aaron", vorbisComment.Artist.Value);
            Assert.AreEqual("Aaron", vorbisComment.Artist[0]);
            Assert.AreEqual("Lenoir", vorbisComment.Artist[1]);
        }
Esempio n. 2
0
        public void AddMethodShouldAppendMultipleValues()
        {
            var vorbisComment = new VorbisComment();

            vorbisComment.Add("ARTIST", new string[] { "Aaron", "Lenoir" });
            vorbisComment.Add("ARTIST", "Third");
            Assert.AreEqual(3, vorbisComment.Artist.Count);
            Assert.AreEqual("Aaron", vorbisComment.Artist[0]);
            Assert.AreEqual("Lenoir", vorbisComment.Artist[1]);
            Assert.AreEqual("Third", vorbisComment.Artist[2]);
        }
Esempio n. 3
0
        public void AddMethodShouldAddSingleValueTag()
        {
            var vorbisComment = new VorbisComment();

            vorbisComment.Add("ARTIST", "Aaron");
            Assert.AreEqual(1, vorbisComment.Artist.Count);
            Assert.AreEqual("Aaron", vorbisComment.Artist.Value);
        }
Esempio n. 4
0
        public void ReplaceMethodShouldReplaceAllValues()
        {
            var vorbisComment = new VorbisComment();

            vorbisComment.Add("ARTIST", new string[] { "Aaron", "Lenoir" });
            vorbisComment.Replace("ARTIST", "Test");
            Assert.AreEqual(1, vorbisComment.Artist.Count);
            Assert.AreEqual("Test", vorbisComment.Artist[0]);
        }