This commit is contained in:
ljacqu
2015-11-25 23:06:56 +01:00
4 changed files with 40 additions and 11 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme.util;
import org.junit.Test;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.List;
@@ -84,4 +85,16 @@ public class StringUtilsTest {
// then
assertThat(result, equalTo("hello"));
}
@Test
public void shouldFormatException() {
// given
MalformedURLException ex = new MalformedURLException("Unrecognized URL format");
// when
String result = StringUtils.formatException(ex);
// then
assertThat(result, equalTo("[MalformedURLException]: Unrecognized URL format"));
}
}