示例#1
0
        public void AddWordsTest()
        {
            BloomFilter bf = new BloomFilter();

            bf.AddWords(new string[] { "Cat", "Dog" });
            Approvals.VerifyAll(CopyToBoolArray(bf.Bits), "Bits");
        }
示例#2
0
        public void FindWords()
        {
            bloom.AddWords(new string[]
                           { "A", "A'asia", "A's", "AA", "AA's", "AAA", "AAM", "AB", "AB's" });

            StringBuilder text = new StringBuilder("Find Words");

            FindWordsTestResults(text, "A");
            FindWordsTestResults(text, "AA");
            FindWordsTestResults(text, "B");
            FindWordsTestResults(text, "C");
            FindWordsTestResults(text, "D");
            FindWordsTestResults(text, "E");

            Approvals.Verify(text);
        }