public void Rank_Match() { var ranker = new RegexSpeculativePlaintextRanker(new Regex(@"the \w+ is .*", RegexOptions.IgnoreCase)); var result = ranker.Classify("The secret is 42."); Assert.AreEqual(1, result); }
public void Rank_DoesNotMatch() { var ranker = new RegexSpeculativePlaintextRanker(new Regex(@"the \w+ is .*", RegexOptions.IgnoreCase)); var result = ranker.Classify("Does not match."); Assert.AreEqual(0, result); }