package pw.ollie.sprint.test;

import org.junit.Assert;
import org.junit.Test;

import pw.ollie.sprint.util.Strings;

import java.util.HashMap;
import java.util.Map;

public class StringsTest {
    @Test
    public void runTest() {
        final String hippo = "hippo";
        final String gyppo = "gyppo";
        Assert.assertEquals("Levenshtein failed", 2,
                Strings.getLevenshteinDistance(hippo, gyppo));

        final Map<String, String> map = new HashMap<String, String>() {
            {
                put("one", "1");
                put("two", "2");
                put("three", "3");
                put("four", "4");
            }
        };
    }
}

@@ -663,16 +663,454 @@
       %7D;
+%0A%0A        Assert.assertEquals(Strings.lookup(map, %22on%22, true).get(), %221%22);%0A%0A        String%5B%5D args = new String%5B%5D %7B%0A                %22hello%22, %22%5C%22world%22, %22is%22, %22cool%5C%22%22, %22nope%22%0A        %7D;%0A%0A        String%5B%5D joined = Strings.joinQuoted(args);%0A        Assert.assertEquals(joined.length, 3);%0A        Assert.assertEquals(joined%5B0%5D, %22hello%22);%0A        Assert.assertEquals(joined%5B1%5D, %22world is cool%22);%0A        Assert.assertEquals(joined%5B2%5D, %22nope%22);
 %0A    %7D%0A%7D

Add testing for Strings#joinQuoted