+++ /dev/null
-/*--------------------------------------------------------------------------\r
- * Copyright 2007 Taro L. Saito\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *--------------------------------------------------------------------------*/\r
-//--------------------------------------\r
-// XerialJ Project\r
-//\r
-// StringUtilTest.java\r
-// Since: 2007/03/27\r
-//\r
-// $URL: http://dev.utgenome.org/svn/utgb/trunk/common/test/org/utgenome/util/StringUtilTest.java $ \r
-// $Author: leo $\r
-//--------------------------------------\r
-package org.xerial.util;\r
-\r
-import static org.junit.Assert.*;\r
-\r
-import java.util.Vector;\r
-\r
-import org.junit.Test;\r
-\r
-public class StringUtilTest\r
-{\r
- @Test\r
- public void testJoin()\r
- {\r
- Vector<String> v = new Vector<String>();\r
- v.add("Hello");\r
- v.add("World!");\r
- assertEquals("Hello World!", StringUtil.join(v, " "));\r
- v.add("SCMD");\r
- assertEquals("Hello, World!, SCMD", StringUtil.join(v, ", "));\r
- }\r
- \r
- @Test\r
- public void quote()\r
- {\r
- String message = "hello world";\r
- assertEquals("\'hello world\'", StringUtil.quote(message, StringUtil.SINGLE_QUOTE));\r
- assertEquals("\"hello world\"", StringUtil.quote(message, StringUtil.DOUBLE_QUOTE));\r
- }\r
-\r
- @Test\r
- public void contatinateWithTab()\r
- {\r
- String s = StringUtil.concatinateWithTab("hello", "world", "2005");\r
- assertEquals("hello\tworld\t2005", s);\r
- }\r
-\r
- \r
-}\r
-\r
-\r
-\r
-\r