src/test/java/eu/digitisation/distance/StringEditDistanceTest.java
@Test
    public void testLevenshteinDistance() {
        System.out.println("levenshteinDistance");
        String first = "patata";
        String second = "apta";
        int expResult = 3;
        int result = StringEditDistance.levenshtein(first, second);
        assertEquals(expResult, result);
        // A second test
        first = "holanda";
        second = "wordland";
        result = StringEditDistance.levenshtein(first, second);
        assertEquals(4, result);
        // Test with normalization
        first = StringNormalizer.reduceWS("Mi enhorabuena");
        second = StringNormalizer.reduceWS("mi en  hora  buena");
        result = StringEditDistance.levenshtein(first, second);
        assertEquals(3, result);
    }
/**
     * Test of levenshtein method, of class StringEditDistance.
     */
Test of levenshtein method, of class StringEditDistance.
Test of levenshtein method of class StringEditDistance .
@Test
    public void testLevenshteinDistance() {
        System.out.println("levenshteinDistance");
        String first = "patata";
        String second = "apta";
        int expResult = 3;
        int result = StringEditDistance.levenshtein(first, second);
        assertEquals(expResult, result);
        first = "holanda";
        second = "wordland";
        result = StringEditDistance.levenshtein(first, second);
        assertEquals(4, result);
        first = StringNormalizer.reduceWS("Mi enhorabuena");
        second = StringNormalizer.reduceWS("mi en  hora  buena");
        result = StringEditDistance.levenshtein(first, second);
        assertEquals(3, result);
    }
@ Test public void testLevenshteinDistance ( ) { System . out . println ( "levenshteinDistance" ) ; String first = "patata" ; String second = "apta" ; int expResult = 3 ; int result = StringEditDistance . levenshtein ( first , second ) ; assertEquals ( expResult , result ) ; first = "holanda" ; second = "wordland" ; result = StringEditDistance . levenshtein ( first , second ) ; assertEquals ( 4 , result ) ; first = StringNormalizer . reduceWS ( "Mi enhorabuena" ) ; second = StringNormalizer . reduceWS ( "mi en  hora  buena" ) ; result = StringEditDistance . levenshtein ( first , second ) ; assertEquals ( 3 , result ) ; }
Test of levenshtein method, of class StringEditDistance.
Test of levenshtein method of class StringEditDistance .
// A second test // Test with normalization