BAEL-972 - Apache Commons Text (#2178)
* Evaluation article: Different Types of Bean Injection in Spring * added tests & changed configuration to Java-based config * removed xml config files * rename unit tests * BAEL-972 - Apache Commons Text * remove code from evaluation article * remove code from evaluation article
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
69c330eb6c
commit
c2574997f7
@@ -0,0 +1,18 @@
|
||||
package com.baeldung.text;
|
||||
|
||||
import org.apache.commons.text.diff.EditScript;
|
||||
import org.apache.commons.text.diff.StringsComparator;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class DiffTest {
|
||||
|
||||
@Test
|
||||
public void whenEditScript_thenCorrect() {
|
||||
StringsComparator cmp = new StringsComparator("ABCFGH", "BCDEFG");
|
||||
EditScript<Character> script = cmp.getScript();
|
||||
int mod = script.getModifications();
|
||||
|
||||
Assert.assertEquals(4, mod);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user