亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testapiconfig.java

?? SMPP(點到點短消息協議)的java實現
?? JAVA
字號:
package ie.omk.smpp.util;import java.math.BigInteger;import java.net.URL;import junit.framework.TestCase;public class TestAPIConfig extends TestCase {    private APIConfig config;        public TestAPIConfig(String name) {        super(name);    }    public void testGetInstance() throws Exception {        assertNotNull(APIConfig.getInstance());    }        public void testConvertToNumber() throws Exception {        assertEquals(0L, config.convertToNumber("0"));        assertEquals(1L, config.convertToNumber("1"));        assertEquals(1827L, config.convertToNumber("1827"));        assertEquals(-89123144L, config.convertToNumber("-89123144"));        assertEquals(2048, config.convertToNumber("2k"));        assertEquals(1048576L, config.convertToNumber("1m"));        assertEquals(116L, config.convertToNumber("1110100b"));        assertEquals(117L, config.convertToNumber("000001110101b"));        assertEquals(0xfeed9128L, config.convertToNumber("0xfeed9128"));        assertEquals(0xdeadbeefL, config.convertToNumber("0XdeadBEEF"));        assertEquals(034L, config.convertToNumber("034"));        assertEquals(8L, config.convertToNumber("010"));        assertEquals(9L, config.convertToNumber("011"));                try {            config.convertToNumber("deadbeef");            fail("Expected NumberFormatException");        } catch (NumberFormatException x) {        }        try {            config.convertToNumber("092");            fail("Expected NumberFormatException");        } catch (NumberFormatException x) {        }        try {            config.convertToNumber("1111112b");            fail("Expected NumberFormatException");        } catch (NumberFormatException x) {        }        try {            config.convertToNumber("0x293b8k");            fail("Expected NumberFormatException");        } catch (NumberFormatException x) {        }    }        public void testPropertyGetters() throws Exception {        try {            config.getProperty("random.property");            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x) {        }        assertEquals("randomValue",                config.getProperty("random.property", "randomValue"));    }        public void testBooleanPropertyGetters() throws Exception {        try {            config.getBoolean("random.property");            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x) {        }        assertFalse(config.getBoolean("random.property", false));        assertTrue(config.getBoolean("random.property", true));                config.setProperty("b.default", "true");        assertTrue(config.getBoolean("b.default", false));                config.setProperty("b.yes", "yes");        config.setProperty("b.on", "on");        config.setProperty("b.true", "true");        config.setProperty("b.1", "1");        config.setProperty("b.number", "65");        config.setProperty("b.no", "no");        config.setProperty("b.off", "off");        config.setProperty("b.false", "false");        config.setProperty("b.0", "0");        assertTrue(config.getBoolean("b.yes"));        assertTrue(config.getBoolean("b.on"));        assertTrue(config.getBoolean("b.true"));        assertTrue(config.getBoolean("b.1"));        assertTrue(config.getBoolean("b.number"));        assertFalse(config.getBoolean("b.no"));        assertFalse(config.getBoolean("b.off"));        assertFalse(config.getBoolean("b.false"));        assertFalse(config.getBoolean("b.0"));                config.setProperty("b.zero", "zero");        try {            config.getBoolean("b.zero");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }    }        public void testShortGetters() throws Exception {        config.setProperty("s.number", "056");        config.setProperty("s.invalid", "text");        config.setProperty("s.tooLow",                Integer.toString((int) Short.MIN_VALUE - 5));        config.setProperty("s.tooHigh",                Integer.toString((int) Short.MAX_VALUE + 5));        assertEquals(5, config.getShort("random.property", (short) 5));        assertEquals(056, config.getShort("s.number"));        assertEquals(056, config.getShort("s.number", (short) 2048));        try {            config.getShort("random.property");            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x){        }        try {            config.getShort("s.invalid");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getShort("s.tooLow");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getShort("s.tooHigh");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }    }        public void testIntGetters() throws Exception {        config.setProperty("i.number", "4k");        config.setProperty("i.invalid", "text");        config.setProperty("i.tooLow",                Long.toString((long) Integer.MIN_VALUE - 5L));        config.setProperty("i.tooHigh",                Long.toString((long) Integer.MAX_VALUE + 5L));        assertEquals(5, config.getInt("random.property", 5));        assertEquals(4096, config.getInt("i.number"));        assertEquals(4096, config.getInt("i.number", 2048));        try {            config.getInt("random.property");            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x){        }        try {            config.getInt("i.invalid");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getInt("i.tooLow");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getInt("i.tooHigh");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }    }    public void testLongGetters() throws Exception {        BigInteger five = BigInteger.valueOf(5L);        BigInteger tooLow = BigInteger.valueOf(Long.MIN_VALUE).subtract(five);        BigInteger tooHigh = BigInteger.valueOf(Long.MAX_VALUE).add(five);        config.setProperty("L.number", "4k");        config.setProperty("L.invalid", "text");        config.setProperty("L.tooLow", tooLow.toString(10));        config.setProperty("L.tooHigh", tooHigh.toString(10));        assertEquals(5L, config.getLong("random.property", 5L));        assertEquals(4096L, config.getLong("L.number"));        assertEquals(4096L, config.getLong("L.number", 2048L));        try {            config.getLong("random.property");            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x){        }        try {            config.getLong("L.invalid");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getLong("L.tooLow");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }        try {            config.getLong("L.tooHigh");            fail("Expected InvalidConfigurationException");        } catch (InvalidConfigurationException x) {        }    }        public void testDefaultAPIProperties() throws Exception {        // These tests match the defaults specified        // in resources/smppapi.properties        try {            config.getInt(APIConfig.LINK_BUFFERSIZE_IN);            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x) {            // pass        }        try {            config.getInt(APIConfig.LINK_BUFFERSIZE_OUT);            fail("Expected PropertyNotFoundException");        } catch (PropertyNotFoundException x) {            // pass        }        assertTrue(config.getBoolean(APIConfig.LINK_AUTO_FLUSH));        assertEquals(120000, config.getInt(APIConfig.LINK_TIMEOUT));        assertEquals(3, config.getInt(APIConfig.TOO_MANY_IO_EXCEPTIONS));        assertEquals(180000, config.getInt(APIConfig.BIND_TIMEOUT));        assertNull(config.getProperty(APIConfig.EVENT_DISPATCHER_CLASS, null));        assertNull(config.getProperty(APIConfig.EVENT_THREAD_FIFO_QUEUE_SIZE, null));        assertNull(config.getProperty(APIConfig.EVENT_THREAD_POOL_SIZE, null));        assertNull(config.getProperty(APIConfig.LINK_AUTOCLOSE_SNOOP, null));    }        public void testConfigure() throws Exception {        URL url = getClass().getResource("TestAPIConfig.properties");        assertNotNull(url);        APIConfig.configure(url);        assertSame(config, APIConfig.getInstance());        config = APIConfig.getInstance();                assertEquals("Some text", config.getProperty("apiConfig.string"));        assertEquals(0x89L, config.getLong("apiConfig.hexNumber"));        assertEquals(0164, config.getInt("apiConfig.octalNumber"));        assertEquals(5, config.getInt("apiConfig.binaryNumber"));        assertEquals(34 * 1024, config.getInt("apiConfig.kiloBytes"));        assertEquals(2L * 1024L * 1024L, config.getLong("apiConfig.megaBytes"));        assertTrue(config.getBoolean("apiConfig.bool"));    }        protected void setUp() throws Exception {        super.setUp();        config = APIConfig.getInstance();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕在线一区免费| 老司机精品视频导航| 五月天中文字幕一区二区| 久久激五月天综合精品| 日本韩国一区二区三区视频| 精品国产a毛片| 亚洲一区二区欧美激情| 国产mv日韩mv欧美| 欧美一级专区免费大片| 亚洲欧美乱综合| 懂色中文一区二区在线播放| 欧美日本一区二区| 亚洲精品乱码久久久久久黑人| 久久精品国产亚洲aⅴ | 中文字幕一区二| 美女免费视频一区二区| 欧美中文一区二区三区| 国产精品欧美一区喷水| 国产在线播放一区| 日韩欧美国产午夜精品| 婷婷六月综合网| 欧美在线色视频| 一区二区三区资源| 91年精品国产| 日韩理论片网站| 99r国产精品| 国产精品久久毛片a| 国产伦精品一区二区三区免费迷| 久久久精品一品道一区| 日本美女视频一区二区| 欧美人与性动xxxx| 天使萌一区二区三区免费观看| 一本一道综合狠狠老| 亚洲天堂2014| 色狠狠色狠狠综合| 一个色妞综合视频在线观看| 色一区在线观看| 亚洲一区二区三区三| 欧美日韩精品专区| 日韩成人一区二区三区在线观看| 在线观看欧美黄色| 天天色图综合网| 91精品国产黑色紧身裤美女| 日韩精品成人一区二区三区| 91精品国产综合久久精品麻豆| 日韩在线一二三区| 日韩欧美久久久| 国产精品一区二区视频| 国产午夜精品久久久久久久| 成人一区在线看| 亚洲精品日日夜夜| 91麻豆精品国产91久久久更新时间 | 国产精品久久精品日日| 99精品欧美一区| 亚洲午夜一二三区视频| 日韩午夜在线观看视频| 国产麻豆精品在线| 亚洲蜜臀av乱码久久精品蜜桃| 欧美在线观看一二区| 男男gaygay亚洲| 日本一区二区三区高清不卡| 色综合网色综合| 美女脱光内衣内裤视频久久影院| 亚洲美女视频一区| 欧美丰满美乳xxx高潮www| 国内久久精品视频| 日韩美女精品在线| 欧美一级黄色录像| 99视频精品全部免费在线| 日韩电影在线观看一区| 国产精品日韩成人| 欧美一级片在线| 91网站最新网址| 久久66热偷产精品| 亚洲宅男天堂在线观看无病毒| 日韩欧美一卡二卡| 色综合久久天天| 精品一区二区三区的国产在线播放 | 欧美一区二区免费视频| 成人美女在线观看| 日本中文一区二区三区| 亚洲人成亚洲人成在线观看图片| 欧美一区二区精品久久911| 99久久精品免费精品国产| 蜜臀av亚洲一区中文字幕| 中文字幕欧美一区| 久久午夜国产精品| 911精品国产一区二区在线| 成人激情图片网| 国产在线不卡一卡二卡三卡四卡| 一区二区在线观看视频| 国产日产亚洲精品系列| 日韩欧美美女一区二区三区| 日本精品视频一区二区| 不卡的av在线播放| 国产激情一区二区三区| 日本不卡视频一二三区| 亚洲综合男人的天堂| 中文字幕日本不卡| 日本一区二区三区免费乱视频| 亚洲视频电影在线| 精品成人在线观看| 日韩欧美国产综合在线一区二区三区| 色网综合在线观看| 91视频一区二区三区| 成人激情午夜影院| 国产91精品一区二区麻豆亚洲| 久久狠狠亚洲综合| 理论电影国产精品| 蜜臀久久99精品久久久久宅男| 亚洲第一在线综合网站| 亚洲一区二区美女| 亚洲一区二区精品3399| 亚洲永久免费av| 亚洲线精品一区二区三区| 亚洲免费伊人电影| 亚洲欧美另类久久久精品| 亚洲日本丝袜连裤袜办公室| 18成人在线观看| 亚洲女人****多毛耸耸8| 亚洲男人的天堂一区二区| 亚洲人成网站色在线观看| 亚洲女性喷水在线观看一区| 亚洲精品乱码久久久久久| 亚洲风情在线资源站| 日韩在线卡一卡二| 久久99精品久久久| 国产经典欧美精品| 91亚洲精华国产精华精华液| 色狠狠色噜噜噜综合网| 欧美片在线播放| 日韩欧美电影在线| 精品三级av在线| 国产农村妇女精品| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产精品九色蝌蚪自拍| 亚洲欧美在线视频| 午夜精品久久久| 麻豆视频观看网址久久| 国产高清久久久| 色综合天天综合网国产成人综合天| 91免费看视频| 91精品免费在线观看| 久久丝袜美腿综合| 亚洲婷婷综合久久一本伊一区| 亚洲自拍偷拍av| 国产久卡久卡久卡久卡视频精品| 欧美一卡二卡三卡| 久久精品视频在线免费观看| 国产精品久久久久婷婷二区次| 一区二区三区中文字幕| 久久精品国产亚洲aⅴ| 99国产一区二区三精品乱码| 欧美日韩国产bt| 国产欧美日韩精品在线| 亚洲成人福利片| 高清成人免费视频| 欧美二区三区的天堂| 欧美激情在线一区二区三区| 亚洲国产一区在线观看| 国产精品一区二区视频| 欧美精品色一区二区三区| 国产亚洲精品资源在线26u| 亚洲第一二三四区| 丁香激情综合五月| 日韩欧美在线网站| 亚洲精品日韩一| 丰满亚洲少妇av| 日韩视频中午一区| 亚洲男同性视频| 国产成人综合亚洲网站| 91精品国产手机| 亚洲理论在线观看| 国产成人av一区| 精品久久久久久久人人人人传媒 | 国内精品国产成人国产三级粉色| 99riav久久精品riav| 国产日韩成人精品| 精品亚洲porn| 日韩一区二区三区视频在线观看 | 欧洲色大大久久| 国产精品福利一区二区三区| 久久电影网站中文字幕| 欧美日韩免费电影| 亚洲激情成人在线| 91尤物视频在线观看| 亚洲国产一区二区a毛片| 豆国产96在线|亚洲| 久久综合狠狠综合| 国产美女av一区二区三区| 日韩欧美精品三级| 免费高清在线一区| 日韩视频免费观看高清完整版| 亚洲国产精品综合小说图片区| 91蜜桃在线免费视频| 国产精品久久久久一区| 99久久精品国产导航| 国产精品高潮呻吟久久| 99re成人在线| 亚洲精品欧美激情|