예제 #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);
        }
예제 #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);
        }
예제 #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);
        }