⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 teststringtools.java

📁 一套JAVA的CA证书签发系统.
💻 JAVA
字号:
/************************************************************************* *                                                                       * *  EJBCA: The OpenSource Certificate Authority                          * *                                                                       * *  This software is free software; you can redistribute it and/or       * *  modify it under the terms of the GNU Lesser General Public           * *  License as published by the Free Software Foundation; either         * *  version 2.1 of the License, or any later version.                    * *                                                                       * *  See terms of license at gnu.org.                                     * *                                                                       * *************************************************************************/ package se.anatom.ejbca.util.junit;import org.apache.log4j.Logger;import junit.framework.*;import se.anatom.ejbca.util.StringTools;/** * Tests the StringTools class . * * @version $Id: TestStringTools.java,v 1.5 2004/05/22 15:37:55 anatom Exp $ */public class TestStringTools extends TestCase {    private static Logger log = Logger.getLogger(TestStringTools.class);    /**     * Creates a new TestStringTools object.     *     * @param name name     */    public TestStringTools(String name) {        super(name);    }    protected void setUp() throws Exception {        log.debug(">setUp()");        log.debug("<setUp()");    }    protected void tearDown() throws Exception {        log.debug(">tearDown()");        log.debug("<tearDown()");    }    /**     * tests stipping whitespace     *     * @throws Exception error     */    public void test01StripWhitespace() throws Exception {        log.debug(">test01StripWhitespace()");        String test = " foo \t bar \r\n\r\n \f\f\f quu x                  ";        assertEquals("foobarquux", StringTools.stripWhitespace(test));        log.debug(">test01StripWhitespace()");    }        public void test02IpStringToOctets() throws Exception {        log.debug(">test02IpStringToOctets()");        String ip = "23.34.45.167";        byte[] octs = StringTools.ipStringToOctets(ip);        //for (int i=0;i<octs.length;i++) {        //    log.error("octs["+i+"]="+(int)octs[i]);        //}        log.debug(">test02IpStringToOctets()");            }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -