Example #1
0
        /// <summary>
        /// A list of <see cref="Regex"/> to filter with
        /// </summary>
        /// <param name="r">A list of <see cref="Regex"/> that you use to filter with</param>
        public void RemoveOnRegex(Regex[] r)
        {
            var stuff = from a in r.AsParallel() from b in ArchiveLinks where !a.IsMatch(b.OriginalLink) select b;

            ArchiveLinks = stuff.ToList();
            ArchiveLinks.Sort();
        }
        public void ArchiveLinksTest()
        {
            IArchiveService service = new MockService();

            ArchiveLinks.SetArchiveService(service);
            new Mnemosyne2Reborn.UserData.RedditUserProfileSqlite("1\\Testing.sqlite");
            List <string> test = new List <string>()
            {
                "help",
                "wat",
                "k"
            };

            ArchiveLinks.ArchivePostLinks(test, new Regex[] { new Regex("") }, red.GetUser("chugga_fan"));
            Mnemosyne2Reborn.UserData.RedditUserProfileSqlite redditUserProfileSqlite = new Mnemosyne2Reborn.UserData.RedditUserProfileSqlite(red.GetUser("chugga_fan"));
            Assert.IsTrue(redditUserProfileSqlite.Unarchived == 3);
        }