* Test of findClosest method, of class ArrayOperations.
*/
@Test
public void testFindClosest_ObjectArr_Object() {
String[] array = new String[] {"string", "array", "new", "int", "assert", "equals"};
DistanceFunction dfc = new LexicographicDistanceFunction(Mode.COUNT_DIFF_CHARS);
assertEquals("new", ArrayOperations.findClosest(array, "nes", dfc));
assertEquals("array", ArrayOperations.findClosest(array, "artsy", dfc));
assertEquals("new", ArrayOperations.findClosest(array, "newly", dfc));
assertEquals("new", ArrayOperations.findClosest(array, "dessert", dfc));
assertEquals("int", ArrayOperations.findClosest(array, "int", dfc));
assertEquals("string", ArrayOperations.findClosest(array, "strong", dfc));
assertEquals("string", ArrayOperations.findClosest(array, "attire", dfc));
assertEquals("array", ArrayOperations.findClosest(array, "sassy", dfc));
DistanceFunction dfd = new LexicographicDistanceFunction(Mode.DEFAULT);
assertEquals("new", ArrayOperations.findClosest(array, "nes", dfd));
assertEquals("array", ArrayOperations.findClosest(array, "artsy", dfd));
assertEquals("array", ArrayOperations.findClosest(array, "newly", dfd));
assertEquals("equals", ArrayOperations.findClosest(array, "dessert", dfd));
assertEquals("int", ArrayOperations.findClosest(array, "int", dfd));
assertEquals("string", ArrayOperations.findClosest(array, "strong", dfd));
assertEquals("assert", ArrayOperations.findClosest(array, "attire", dfd));
assertEquals("array", ArrayOperations.findClosest(array, "sassy", dfd));
DistanceFunction edf = new StringEditDistanceFunction(StringEditDistanceFunction.Mode.DEFAULT);
assertEquals("new", ArrayOperations.findClosest(array, "nes", edf));
assertEquals("array", ArrayOperations.findClosest(array, "artsy", edf));
assertEquals("new", ArrayOperations.findClosest(array, "newly", edf));
assertEquals("assert", ArrayOperations.findClosest(array, "dessert", edf));
assertEquals("int", ArrayOperations.findClosest(array, "int", edf));
assertEquals("string", ArrayOperations.findClosest(array, "strong", edf));
assertEquals("string", ArrayOperations.findClosest(array, "attire", edf));
assertEquals("equals", ArrayOperations.findClosest(array, "because", edf));
assertEquals("array", ArrayOperations.findClosest(array, "sassy", edf));
DistanceFunction edfa = new StringEditDistanceFunction(StringEditDistanceFunction.Mode.ALPHABETIC_REPLACE);
assertEquals("new", ArrayOperations.findClosest(array, "nes", edfa));
assertEquals("array", ArrayOperations.findClosest(array, "artsy", edfa));
assertEquals("new", ArrayOperations.findClosest(array, "newly", edfa));
assertEquals("assert", ArrayOperations.findClosest(array, "dessert", edfa));
assertEquals("int", ArrayOperations.findClosest(array, "int", edfa));
assertEquals("string", ArrayOperations.findClosest(array, "strong", edfa));
assertEquals("assert", ArrayOperations.findClosest(array, "attire", edfa));
assertEquals("assert", ArrayOperations.findClosest(array, "because", edfa));
assertEquals("array", ArrayOperations.findClosest(array, "sassy", edfa));
DistanceFunction edfk = new StringEditDistanceFunction(StringEditDistanceFunction.Mode.KEYBOARD_REPLACE);
assertEquals("new", ArrayOperations.findClosest(array, "nes", edfk));
assertEquals("array", ArrayOperations.findClosest(array, "artsy", edfk));
assertEquals("new", ArrayOperations.findClosest(array, "newly", edfk));
assertEquals("assert", ArrayOperations.findClosest(array, "dessert", edfk));
assertEquals("int", ArrayOperations.findClosest(array, "int", edfk));