Exemple #1
0
        public void Rank_Opposite()
        {
            var ranker = new WordlistSpeculativePlaintextRanker(new[] {
                "the",
                "answer",
                "is",
                "wordlist",
            });
            var result = ranker.Classify("does not match.");

            Assert.AreEqual(0, result);
        }
Exemple #2
0
        public void Rank_Full()
        {
            var ranker = new WordlistSpeculativePlaintextRanker(new[] {
                "the",
                "answer",
                "is",
                "wordlist",
            });
            var result = ranker.Classify("theansweriswordlist");

            Assert.AreEqual(1, result);
        }
Exemple #3
0
        public void Rank_CaseInsensitive()
        {
            var ranker = new WordlistSpeculativePlaintextRanker(new[] {
                "the",
                "answeR",
                "is",
                "Wordlist",
            });
            var result = ranker.Classify("The answer Is: wordList.");

            Assert.AreEqual(19 / 24D, result);
        }