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

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

?? basicdynabeantestcase.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        testGetSimpleFloat();
        testGetSimpleInt();
        testGetSimpleLong();
        testGetSimpleShort();
        testGetSimpleString();
        testMappedContains();
        testMappedRemove();

        // Ensure that we can create a new instance of the same DynaClass
        try {
            bean = bean.getDynaClass().newInstance();
        } catch (Exception e) {
            fail("Exception creating new instance: " + e);
        }
        testGetDescriptorArguments();
        testGetDescriptorBoolean();
        testGetDescriptorDouble();
        testGetDescriptorFloat();
        testGetDescriptorInt();
        testGetDescriptorLong();
        testGetDescriptorSecond();
        testGetDescriptorShort();
        testGetDescriptorString();
        testGetDescriptors();

    }


    /**
     * Corner cases on setIndexedProperty invalid arguments.
     */
    public void testSetIndexedArguments() {

        try {
            bean.set("intArray", -1, new Integer(0));
            fail("Should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
            // Expected response
        } catch (Throwable t) {
            fail("Threw " + t + " instead of IndexOutOfBoundsException");
        }

    }


    /**
     * Positive and negative tests on setIndexedProperty valid arguments.
     */
    public void testSetIndexedValues() {

        Object value = null;

        try {
            bean.set("intArray", 0, new Integer(1));
            value = (Integer) bean.get("intArray", 0);
            assertNotNull("Returned new value 0", value);
            assertTrue("Returned Integer new value 0",
                    value instanceof Integer);
            assertEquals("Returned correct new value 0", 1,
                    ((Integer) value).intValue());
        } catch (Throwable t) {
            fail("Threw " + t);
        }

        try {
            bean.set("intIndexed", 1, new Integer(11));
            value = (Integer) bean.get("intIndexed", 1);
            assertNotNull("Returned new value 1", value);
            assertTrue("Returned Integer new value 1",
                    value instanceof Integer);
            assertEquals("Returned correct new value 1", 11,
                    ((Integer) value).intValue());
        } catch (Throwable t) {
            fail("Threw " + t);
        }

        try {
            bean.set("listIndexed", 2, "New Value 2");
            value = (String) bean.get("listIndexed", 2);
            assertNotNull("Returned new value 2", value);
            assertTrue("Returned String new value 2",
                    value instanceof String);
            assertEquals("Returned correct new value 2", "New Value 2",
                    (String) value);
        } catch (Throwable t) {
            fail("Threw " + t);
        }

        try {
            bean.set("stringArray", 3, "New Value 3");
            value = (String) bean.get("stringArray", 3);
            assertNotNull("Returned new value 3", value);
            assertTrue("Returned String new value 3",
                    value instanceof String);
            assertEquals("Returned correct new value 3", "New Value 3",
                    (String) value);
        } catch (Throwable t) {
            fail("Threw " + t);
        }

        try {
            bean.set("stringIndexed", 4, "New Value 4");
            value = (String) bean.get("stringIndexed", 4);
            assertNotNull("Returned new value 4", value);
            assertTrue("Returned String new value 4",
                    value instanceof String);
            assertEquals("Returned correct new value 4", "New Value 4",
                    (String) value);
        } catch (Throwable t) {
            fail("Threw " + t);
        }


    }


    /**
     * Positive and negative tests on setMappedProperty valid arguments.
     */
    public void testSetMappedValues() {

        try {
            bean.set("mappedProperty", "First Key", "New First Value");
            assertEquals("Can replace old value",
                    "New First Value",
                    (String) bean.get("mappedProperty", "First Key"));
        } catch (Throwable t) {
            fail("Finding fourth value threw " + t);
        }

        try {
            bean.set("mappedProperty", "Fourth Key", "Fourth Value");
            assertEquals("Can set new value",
                    "Fourth Value",
                    (String) bean.get("mappedProperty", "Fourth Key"));
        } catch (Throwable t) {
            fail("Finding fourth value threw " + t);
        }


    }


    /**
     * Test setSimpleProperty on a boolean property.
     */
    public void testSetSimpleBoolean() {

        try {
            boolean oldValue =
                    ((Boolean) bean.get("booleanProperty")).booleanValue();
            boolean newValue = !oldValue;
            bean.set("booleanProperty", new Boolean(newValue));
            assertTrue("Matched new value",
                    newValue ==
                    ((Boolean) bean.get("booleanProperty")).booleanValue());
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a double property.
     */
    public void testSetSimpleDouble() {

        try {
            double oldValue =
                    ((Double) bean.get("doubleProperty")).doubleValue();
            double newValue = oldValue + 1.0;
            bean.set("doubleProperty", new Double(newValue));
            assertEquals("Matched new value",
                    newValue,
                    ((Double) bean.get("doubleProperty")).doubleValue(),
                    0.005);
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a float property.
     */
    public void testSetSimpleFloat() {

        try {
            float oldValue =
                    ((Float) bean.get("floatProperty")).floatValue();
            float newValue = oldValue + (float) 1.0;
            bean.set("floatProperty", new Float(newValue));
            assertEquals("Matched new value",
                    newValue,
                    ((Float) bean.get("floatProperty")).floatValue(),
                    (float) 0.005);
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a int property.
     */
    public void testSetSimpleInt() {

        try {
            int oldValue =
                    ((Integer) bean.get("intProperty")).intValue();
            int newValue = oldValue + 1;
            bean.set("intProperty", new Integer(newValue));
            assertEquals("Matched new value",
                    newValue,
                    ((Integer) bean.get("intProperty")).intValue());
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a long property.
     */
    public void testSetSimpleLong() {

        try {
            long oldValue =
                    ((Long) bean.get("longProperty")).longValue();
            long newValue = oldValue + 1;
            bean.set("longProperty", new Long(newValue));
            assertEquals("Matched new value",
                    newValue,
                    ((Long) bean.get("longProperty")).longValue());
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a short property.
     */
    public void testSetSimpleShort() {

        try {
            short oldValue =
                    ((Short) bean.get("shortProperty")).shortValue();
            short newValue = (short) (oldValue + 1);
            bean.set("shortProperty", new Short(newValue));
            assertEquals("Matched new value",
                    newValue,
                    ((Short) bean.get("shortProperty")).shortValue());
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    /**
     * Test setSimpleProperty on a String property.
     */
    public void testSetSimpleString() {

        try {
            String oldValue = (String) bean.get("stringProperty");
            String newValue = oldValue + " Extra Value";
            bean.set("stringProperty", newValue);
            assertEquals("Matched new value",
                    newValue,
                    (String) bean.get("stringProperty"));
        } catch (Throwable e) {
            fail("Exception: " + e);
        }

    }


    // ------------------------------------------------------ Protected Methods


    /**
     * Create and return a <code>DynaClass</code> instance for our test
     * <code>DynaBean</code>.
     */
    protected DynaClass createDynaClass() {

        int intArray[] = new int[0];
        String stringArray[] = new String[0];

        DynaClass dynaClass = new BasicDynaClass
                ("TestDynaClass", null,
                        new DynaProperty[]{
                            new DynaProperty("booleanProperty", Boolean.TYPE),
                            new DynaProperty("booleanSecond", Boolean.TYPE),
                            new DynaProperty("doubleProperty", Double.TYPE),
                            new DynaProperty("floatProperty", Float.TYPE),
                            new DynaProperty("intArray", intArray.getClass()),
                            new DynaProperty("intIndexed", intArray.getClass()),
                            new DynaProperty("intProperty", Integer.TYPE),
                            new DynaProperty("listIndexed", List.class),
                            new DynaProperty("longProperty", Long.TYPE),
                            new DynaProperty("mappedProperty", Map.class),
                            new DynaProperty("mappedIntProperty", Map.class),
                            new DynaProperty("nullProperty", String.class),
                            new DynaProperty("shortProperty", Short.TYPE),
                            new DynaProperty("stringArray", stringArray.getClass()),
                            new DynaProperty("stringIndexed", stringArray.getClass()),
                            new DynaProperty("stringProperty", String.class),
                        });
        return (dynaClass);

    }


    /**
     * Base for testGetDescriptorXxxxx() series of tests.
     *
     * @param name Name of the property to be retrieved
     * @param type Expected class type of this property
     */
    protected void testGetDescriptorBase(String name, Class type) {

        try {
            DynaProperty descriptor =
                    bean.getDynaClass().getDynaProperty(name);
            assertNotNull("Got descriptor", descriptor);
            assertEquals("Got correct type", type, descriptor.getType());
        } catch (Throwable t) {
            fail("Threw an exception: " + t);
        }

    }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品一区二区三区四区 | 欧美大尺度电影在线| 五月综合激情婷婷六月色窝| 欧美视频在线观看一区二区| 亚洲成人在线观看视频| 日韩欧美一级特黄在线播放| 婷婷丁香久久五月婷婷| 欧美一区二区福利在线| 成人午夜看片网址| 日韩成人伦理电影在线观看| 欧美一区二区三区在线看| 亚洲精品福利视频网站| 高清日韩电视剧大全免费| 一区二区三区四区在线免费观看| 日韩一区二区三| 午夜日韩在线观看| 国产午夜精品理论片a级大结局 | 风间由美一区二区三区在线观看 | 欧美日韩一区二区三区在线看| 国产原创一区二区三区| 亚洲免费观看视频| 精品国产一区二区三区不卡| 欧美人妇做爰xxxⅹ性高电影 | 无码av免费一区二区三区试看 | 精品一区二区三区不卡| 欧美精品在线观看播放| 日韩福利电影在线观看| 日韩三级高清在线| 精品一区二区精品| 久久欧美中文字幕| 成人性生交大片免费看中文| 亚洲色图19p| 色狠狠一区二区| 亚洲成人免费视| 欧美一区二区久久久| 精品一区二区三区在线观看国产| 精品动漫一区二区三区在线观看| 国产麻豆91精品| 136国产福利精品导航| 欧美丝袜丝交足nylons图片| 免费在线观看视频一区| 久久久久久久综合色一本| fc2成人免费人成在线观看播放| 亚洲最新在线观看| 欧美精品国产精品| 国产一区二区不卡在线| 亚洲三级电影全部在线观看高清| 欧美精品亚洲一区二区在线播放| 精品一二线国产| 中文字幕制服丝袜成人av| 欧洲av一区二区嗯嗯嗯啊| 日本vs亚洲vs韩国一区三区| 国产视频一区二区三区在线观看| 色综合激情五月| 美女被吸乳得到大胸91| 国产精品久久久久毛片软件| 欧美性猛交一区二区三区精品| 久久99日本精品| 亚洲色图一区二区| 欧美一区二区在线不卡| 久久免费视频色| 色播五月激情综合网| 麻豆精品视频在线观看| 亚洲免费视频中文字幕| 日韩女优av电影在线观看| 99视频超级精品| 视频一区欧美日韩| 欧美国产精品v| 欧美日韩精品一区二区天天拍小说 | 日韩免费观看高清完整版在线观看| 国产盗摄精品一区二区三区在线| 亚洲一区二区欧美| 国产日韩av一区| 欧美美女bb生活片| 成人18视频日本| 蜜桃视频在线观看一区| 亚洲精品水蜜桃| 欧美精品一区二区蜜臀亚洲| 日本高清不卡视频| 国产成人免费视频网站| 视频一区欧美精品| 日韩美女久久久| 2024国产精品| 91精品国产一区二区三区蜜臀| aa级大片欧美| 国产一区二区三区最好精华液| 亚洲一区中文日韩| 国产精品国产三级国产aⅴ中文| 日韩欧美中文字幕公布| 欧美在线三级电影| 北条麻妃国产九九精品视频| 久久99精品久久久久久动态图| 亚洲一区中文日韩| 亚洲丝袜制服诱惑| 久久精品一区二区三区四区| 欧美一区二区三区色| 色婷婷综合久久久中文字幕| 国v精品久久久网| 极品少妇xxxx偷拍精品少妇| 日精品一区二区三区| 一区二区在线看| 亚洲欧洲国产日韩| 久久免费视频色| 精品欧美一区二区在线观看| 欧美男人的天堂一二区| 欧美在线观看禁18| 99久久婷婷国产综合精品电影 | 美女视频一区在线观看| 午夜亚洲福利老司机| 亚洲欧美日韩精品久久久久| 国产精品蜜臀在线观看| 久久精品视频在线免费观看| 日韩免费电影一区| 51久久夜色精品国产麻豆| 欧美日韩一区三区四区| 一本色道久久加勒比精品| 成人h动漫精品一区二区 | 美女精品自拍一二三四| 日韩精品1区2区3区| 亚洲福利电影网| 69p69国产精品| 欧美日韩一区二区三区免费看| 欧美在线观看禁18| 色成人在线视频| 欧美午夜片在线观看| 欧美三级电影在线观看| 在线精品亚洲一区二区不卡| 色噜噜狠狠一区二区三区果冻| 97久久超碰国产精品| 91网上在线视频| 在线视频综合导航| 欧美天天综合网| 欧美精三区欧美精三区| 欧美一区二区日韩| 精品少妇一区二区三区视频免付费 | 久久99蜜桃精品| 另类小说色综合网站| 久久er99热精品一区二区| 麻豆视频一区二区| 狠狠色丁香久久婷婷综合_中| 国产乱码精品一区二区三| 成人午夜在线视频| 91丨porny丨首页| 欧美亚洲国产一区在线观看网站| 欧美午夜寂寞影院| 欧美一区二区三区视频免费| 精品国一区二区三区| 久久人人爽爽爽人久久久| 中文字幕第一页久久| 亚洲另类中文字| 五月天久久比比资源色| 蜜臀精品一区二区三区在线观看| 国产在线不卡一区| 97超碰欧美中文字幕| 欧美在线你懂得| 欧美岛国在线观看| 欧美激情一区二区三区在线| 亚洲精品少妇30p| 天堂在线一区二区| 韩日精品视频一区| 99re66热这里只有精品3直播| 欧美性受xxxx| 精品国产乱码久久久久久1区2区| 国产欧美日韩综合| 一区二区三区影院| 另类小说图片综合网| 成人免费精品视频| 欧美日韩在线播放一区| 精品国产第一区二区三区观看体验| 国产情人综合久久777777| 一区二区三区中文在线| 看国产成人h片视频| 不卡电影免费在线播放一区| 欧美性大战xxxxx久久久| 精品免费国产一区二区三区四区| 中文字幕不卡一区| 亚洲a一区二区| 粉嫩av一区二区三区在线播放| 色久综合一二码| 精品国产伦理网| 亚洲精品第一国产综合野| 久久国产综合精品| 91麻豆国产香蕉久久精品| 欧美一区二区精品在线| 最新日韩在线视频| 蜜臀久久99精品久久久久久9| 成人免费视频播放| 欧美精品aⅴ在线视频| 久久久久久久国产精品影院| 亚洲自拍偷拍九九九| 国产精品一区二区果冻传媒| 欧美性xxxxxx少妇| 亚洲国产精品国自产拍av| 亚洲成人免费在线观看| 高清不卡在线观看| 91麻豆精品国产| 亚洲天堂网中文字| 狠狠狠色丁香婷婷综合激情| 欧美性xxxxx极品少妇| 国产精品免费人成网站|