Reformat whole codebase using Android Studio
This commit is contained in:
parent
d5322667d5
commit
c15913c1ab
161 changed files with 15124 additions and 18537 deletions
|
|
@ -3,27 +3,22 @@ package btools.util;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class StringUtilsTest
|
||||
{
|
||||
private static String[] raw = new String[] { "hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", "\"hi\" 'there'" };
|
||||
private static String[] xml = new String[] { "hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", ""hi" 'there'" };
|
||||
private static String[] jsn = new String[] { "hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", "\\\"hi\\\" \\'there\\'" };
|
||||
public class StringUtilsTest {
|
||||
private static String[] raw = new String[]{"hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", "\"hi\" 'there'"};
|
||||
private static String[] xml = new String[]{"hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", ""hi" 'there'"};
|
||||
private static String[] jsn = new String[]{"hallo", "is 1<2 ?", "or 4>5 ?", "or 1<>2 ?", "\\\"hi\\\" \\'there\\'"};
|
||||
|
||||
@Test
|
||||
public void xmlEncodingTest()
|
||||
{
|
||||
for( int i=0; i<raw.length; i++ )
|
||||
{
|
||||
Assert.assertEquals( "xml encoding mismatch for raw: " + raw[i], xml[i], StringUtils.escapeXml10( raw[i] ) );
|
||||
}
|
||||
public void xmlEncodingTest() {
|
||||
for (int i = 0; i < raw.length; i++) {
|
||||
Assert.assertEquals("xml encoding mismatch for raw: " + raw[i], xml[i], StringUtils.escapeXml10(raw[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void jsonEncodingTest()
|
||||
{
|
||||
for( int i=0; i<raw.length; i++ )
|
||||
{
|
||||
Assert.assertEquals( "json encoding mismatch for raw: " + raw[i], jsn[i], StringUtils.escapeJson( raw[i] ) );
|
||||
public void jsonEncodingTest() {
|
||||
for (int i = 0; i < raw.length; i++) {
|
||||
Assert.assertEquals("json encoding mismatch for raw: " + raw[i], jsn[i], StringUtils.escapeJson(raw[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue