Beispiel #1
0
        public static void TestRssName()
        {
            var name = "Nanatsu no Taizai - Kamigami no Gekirin - 03 [1080p AVC-YUV444P10].mkv";

            name = RegexUtills.FixRssTitle(name);
            Assert.AreEqual("nanatsu no taizai kamigami no gekirin", name);
            var name2 = "Steins;Gate - 01 [1080p].mkv";

            name2 = RegexUtills.FixRssTitle(name2);
            Assert.AreEqual("steins gate", name2);
        }
Beispiel #2
0
        public static void TestLevenshteinDistancePercent()
        {
            var percent = RegexUtills.GetLevenshteinDistancePercent("Steins;Gate", "Steins;Gate - 01 [1080p].mkv");

            Assert.AreEqual(39, percent);

            var percent3 = RegexUtills.GetLevenshteinDistancePercent(
                RegexUtills.RemoveChars("Steins;Gate"),
                RegexUtills.FixRssTitle("Steins;Gate - 01 [1080p].mkv"));

            Assert.AreEqual(100, percent3);
        }