You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/07/27 10:43:15 UTC
[27/50] [abbrv] git commit: updated refs/heads/reporter to 3e1816d
CLOUDSTACK-8658: test default platform charset
Signed-off-by: wilderrodrigues <wr...@schubergphilis.com>
This closes #612
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2982fcf6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2982fcf6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2982fcf6
Branch: refs/heads/reporter
Commit: 2982fcf6158e10a2996ba2e48b9678184dd453e7
Parents: 822ea9c
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Jul 21 22:46:43 2015 +0200
Committer: wilderrodrigues <wr...@schubergphilis.com>
Committed: Wed Jul 22 10:06:31 2015 +0200
----------------------------------------------------------------------
utils/test/com/cloud/utils/StringUtilsTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2982fcf6/utils/test/com/cloud/utils/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/StringUtilsTest.java b/utils/test/com/cloud/utils/StringUtilsTest.java
index 5a90300..58b8b90 100644
--- a/utils/test/com/cloud/utils/StringUtilsTest.java
+++ b/utils/test/com/cloud/utils/StringUtilsTest.java
@@ -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;
@@ -30,6 +31,16 @@ 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\"}";
//TODO: It would be nice to clean up the regex in question to not