LevenshteinCompilationTest.java 640 B

12345678910111213141516171819202122
  1. import levenshtein.Levenshtein;
  2. import org.junit.Test;
  3. import org.junit.runner.JUnitCore;
  4. import static org.junit.Assert.assertEquals;
  5. public class LevenshteinCompilationTest {
  6. public LevenshteinCompilationTest() {
  7. }
  8. @Test(timeout = 10000)
  9. public void runTest() {
  10. Levenshtein levenshtein = new Levenshtein("nämlich", "dämlich");
  11. assertEquals("Incorrect result comparing nämlich and dämlich", 1, levenshtein.getDistance());
  12. }
  13. public static void main(String[] args) throws Exception {
  14. JUnitCore.main(LevenshteinCompilationTest.class.getName());
  15. }
  16. }