Exemplo n.º 1
0
        public void TestGuidDeletion(string before, string after, Guid guid)
        {
            var clip = new YoutubeClip {
                Description = before + "\n" + YoutubeClip.GuidMarker(guid) + "\n" + after
            };

            clip.UpdateGuid(null);
            Assert.AreEqual(before + "\n\n" + after, clip.Description);
        }
Exemplo n.º 2
0
        public void TestGuidReplacement(string before, string after, Guid guid1, Guid guid2)
        {
            var clip = new YoutubeClip {
                Description = before + "\n" + YoutubeClip.GuidMarker(guid1) + "\n" + after
            };

            clip.UpdateGuid(guid2);
            var expected = before + "\n" + YoutubeClip.GuidMarker(guid2) + "\n" + after;

            Assert.AreEqual(expected, clip.Description);
        }
Exemplo n.º 3
0
        public void TestGuidAddition(string desc, Guid guid)
        {
            var clip = new YoutubeClip {
                Description = desc
            };

            clip.UpdateGuid(guid);
            string expected = desc + "\n" + "[GUID: " + guid + "]";

            Assert.AreEqual(expected, clip.Description);
        }