コード例 #1
0
ファイル: MiscellaneousTests.cs プロジェクト: svn2github/awb
        public void RemoveListDuplicates10K()
        {
            const int big = 10000;
            ListMaker LMakerLarge = new ListMaker();
            LMakerLarge.Clear();
            for(int i=1; i<big; i++)
                LMakerLarge.Add(new Article(i.ToString()));

            LMakerLarge.Add(new Article("1"));

            Assert.AreEqual(LMakerLarge.Count, big);

            LMakerLarge.RemoveListDuplicates();

            Assert.AreEqual(LMakerLarge.Count, big-1, "Duplicate removed");
            Assert.IsTrue(LMakerLarge.Contains(new Article("1")), "First instance of article retained");
        }
コード例 #2
0
ファイル: MiscellaneousTests.cs プロジェクト: svn2github/awb
        public void FilterNonMainArticlesVolume()
        {
            const int big = 500;
            ListMaker LMakerLarge = new ListMaker();
            LMakerLarge.Clear();
            for(int i=1; i<big; i++)
                LMakerLarge.Add(i.ToString());

            LMakerLarge.Add("Talk:Me");

            LMakerLarge.FilterNonMainArticles();
            Assert.AreEqual(LMakerLarge.Count, big-1, "Non-mainspace article removed");
        }