mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8658: test default platform charset
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com> This closes #612
This commit is contained in:
parent
822ea9c787
commit
2982fcf615
|
|
@ -21,6 +21,7 @@ package com.cloud.utils;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
@ -29,6 +30,16 @@ import junit.framework.Assert;
|
|||
import org.junit.Test;
|
||||
|
||||
public class StringUtilsTest {
|
||||
@Test
|
||||
public void testGetPrefferedCharset() {
|
||||
assertEquals(StringUtils.getPreferredCharset(),Charset.forName("UTF-8"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDefaultCharset() {
|
||||
assertEquals(StringUtils.getPreferredCharset(),Charset.defaultCharset());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCleanPasswordFromJsonObjectAtEnd() {
|
||||
String input = "{\"foo\":\"bar\",\"password\":\"test\"}";
|
||||
|
|
|
|||
Loading…
Reference in New Issue