public void EditDistance() { Spelling _SpellChecker = NewSpellChecker(); Assertion.AssertEquals("Incorrect EditDistance", 1, _SpellChecker.EditDistance("test", "tst")); Assertion.AssertEquals("Incorrect EditDistance", 2, _SpellChecker.EditDistance("test", "tes")); Assertion.AssertEquals("Incorrect EditDistance", 0, _SpellChecker.EditDistance("test", "test")); }
public void EditDistance() { Spelling _SpellChecker = NewSpellChecker(); Assert.True(1 == _SpellChecker.EditDistance("test", "tst"), "Incorrect EditDistance"); Assert.True(2 == _SpellChecker.EditDistance("test", "tes"), "Incorrect EditDistance"); Assert.True(0 == _SpellChecker.EditDistance("test", "test"), "Incorrect EditDistance"); }