示例#1
0
    public void TestDictionary1()
    {
        kyu5DidYouMean kata = new kyu5DidYouMean(new List <string> {
            "cherry", "pineapple", "melon", "strawberry", "raspberry"
        });

        Assert.AreEqual("strawberry", kata.FindMostSimilar("strawbery"));
        Assert.AreEqual("cherry", kata.FindMostSimilar("berry"));
    }
示例#2
0
    public void TestDictionary2()
    {
        kyu5DidYouMean kata = new kyu5DidYouMean(new List <string> {
            "javascript", "java", "ruby", "php", "python", "coffeescript"
        });

        Assert.AreEqual("java", kata.FindMostSimilar("heaven"));
        Assert.AreEqual("javascript", kata.FindMostSimilar("javascript"));
    }