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

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

?? testwritetag.java

?? struts的源代碼
?? JAVA
字號:
/*
 * $Id: TestWriteTag.java 54929 2004-10-16 16:38:42Z germuska $ 
 *
 * Copyright 1999-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.struts.taglib.bean;

import java.util.Locale;

import javax.servlet.jsp.PageContext;

import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.cactus.WebResponse;
import org.apache.struts.Globals;
import org.apache.struts.taglib.SimpleBeanForTesting;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.taglib.TaglibTestBase;

/**
 * Suite of unit tests for the
 * <code>org.apache.struts.taglib.bean.WriteTag</code> class.
 *
 */
public class TestWriteTag extends TaglibTestBase {
        protected final static String TEST_STRING_VAL = "Test Value";
        protected final static Integer TEST_INTEGER_VAL = new Integer("1234");
        protected final static Double  TEST_DOUBLE_VAL  = new Double("1234.5961");
        protected final static String REQUEST_KEY = "REQUEST_KEY";

    /**
     * Defines the testcase name for JUnit.
     *
     * @param theName the testcase's name.
     */
    public TestWriteTag(String theName) {
        super(theName);
    }

    /**
     * Start the tests.
     *
     * @param theArgs the arguments. Not used
     */
    public static void main(String[] theArgs) {
        junit.awtui.TestRunner.main(new String[] {TestWriteTag.class.getName()});
    }

    /**
     * @return a test suite (<code>TestSuite</code>) that includes all methods
     *         starting with "test"
     */
    public static Test suite() {
        // All methods starting with "test" will be executed in the test suite.
        return new TestSuite(TestWriteTag.class);
    }

        private void formatAndTest(String compare, String output) {
                //fix for introduced carriage return / line feeds
                output = replace(output,"\r","");
                output = replace(output,"\n","");
                output = output.trim();
                //System.out.println("Testing [" + compare + "] == [" + output + "]");
            assertEquals(compare, output);
        }

    private void runMyTest(String whichTest, String locale) throws Exception {
        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
                request.setAttribute("runTest", whichTest);
                pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
    }

        // Name
    public void testWriteTagName() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_STRING_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagName", "");
        }
        public void endWriteTagName(WebResponse response){
                formatAndTest(TEST_STRING_VAL, response.getText());
        }

        // Property
    public void testWriteTagNameProperty() throws Exception {
        SimpleBeanForTesting sbft = new SimpleBeanForTesting(TEST_STRING_VAL);
                pageContext.setAttribute(REQUEST_KEY, sbft,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameProperty", "");
        }
        public void endWriteTagNameProperty(WebResponse response){
                formatAndTest(TEST_STRING_VAL, response.getText());
        }

        // Name and Format
    public void testWriteTagNameFormat() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormat", "");
        }
        public void endWriteTagNameFormat(WebResponse response){
                formatAndTest("1,234" , response.getText());
        }

        // Name, Format, and FormatKey (default bundle)
    public void testWriteTagNameFormatKeyDefaultBundle() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyDefaultBundle", "");
        }
        public void endWriteTagNameFormatKeyDefaultBundle(WebResponse response){
                formatAndTest("$1,234" , response.getText());
        }

        // Name, Format, and FormatKey (alternate bundle)
    public void testWriteTagNameFormatKeyAlternateBundle() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyAlternateBundle", "");
        }
        public void endWriteTagNameFormatKeyAlternateBundle(WebResponse response){
                formatAndTest("$1,234" , response.getText());
        }

        // Name, Format, and FormatKey (default bundle) (Double)
    public void testWriteTagNameFormatKeyDefaultBundleDouble() throws Exception {
                pageContext.setAttribute(REQUEST_KEY, TEST_DOUBLE_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyDefaultBundleDouble", "");
        }
        public void endWriteTagNameFormatKeyDefaultBundleDouble(WebResponse response){
                formatAndTest("$1,235" , response.getText());
        }

        // Name, Format, and FormatKey (alternate bundle) (Double)
    public void testWriteTagNameFormatKeyAlternateBundleDouble() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_DOUBLE_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyAlternateBundleDouble", "");
        }
        public void endWriteTagNameFormatKeyAlternateBundleDouble(WebResponse response){
                formatAndTest("$1,234.6" , response.getText());
        }

        // Name, Format, and FormatKey (default bundle)
    public void testWriteTagNameFormatKeyDefaultBundle_fr() throws Exception {
                pageContext.setAttribute(REQUEST_KEY, TEST_DOUBLE_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyDefaultBundle", "fr");
        }
        public void endWriteTagNameFormatKeyDefaultBundle_fr(WebResponse response){
                formatAndTest("$1234,5961.", response.getText());
        }

        // Name, Format, and FormatKey (alternate bundle)
    public void testWriteTagNameFormatKeyAlternateBundle_fr() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,TEST_DOUBLE_VAL,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFormatKeyAlternateBundle", "fr");
        }
        public void endWriteTagNameFormatKeyAlternateBundle_fr(WebResponse response){
                formatAndTest("$1234,5961." , response.getText());
        }

        // Name, Property, and Format
    public void testWriteTagNamePropertyFormat() throws Exception {
        SimpleBeanForTesting sbft = new SimpleBeanForTesting(TEST_INTEGER_VAL);
                pageContext.setAttribute(REQUEST_KEY, sbft,PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNamePropertyFormat", "");
        }
        public void endWriteTagNamePropertyFormat(WebResponse response){
                formatAndTest("1,234", response.getText());
        }

        // Name and ignore
    public void testWriteTagNameIgnore() throws Exception {
                runMyTest("testWriteTagNameIgnore", "");
        }
        public void endWriteTagNameIgnore(WebResponse response){
                formatAndTest("", response.getText());
        }

        // Name and filter
    public void testWriteTagNameFilter() throws Exception {
                pageContext.setAttribute(REQUEST_KEY,"<testing&'\">",PageContext.REQUEST_SCOPE);
                runMyTest("testWriteTagNameFilter", "");
        }
        public void endWriteTagNameFilter(WebResponse response){
                formatAndTest(TagUtils.getInstance().filter("<testing&'\">"), response.getText());
        }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩女优视频免费观看| 欧美日韩国产高清一区二区| 国产a精品视频| 欧美三级日韩三级国产三级| 久久综合五月天婷婷伊人| 亚洲一区二区三区视频在线 | 色综合激情久久| 日韩欧美在线影院| 亚洲影院免费观看| yourporn久久国产精品| 26uuu另类欧美| 日本中文在线一区| 精品视频在线免费看| 国产精品福利一区二区| 国产a级毛片一区| 日韩久久久精品| 五月天欧美精品| 色欧美乱欧美15图片| 中文字幕人成不卡一区| 国产成人精品亚洲午夜麻豆| 欧美精品一区二区三区在线 | 欧美成人一区二区| 亚洲成人黄色影院| 欧美久久久久久久久久| 亚洲一卡二卡三卡四卡 | 亚洲一区二区三区小说| www.一区二区| 国产精品色噜噜| 国产成人av一区二区| 久久久久99精品一区| 精品一区二区三区久久| 精品区一区二区| 久久99在线观看| 久久免费看少妇高潮| 精品伊人久久久久7777人| 欧美va亚洲va| 国产曰批免费观看久久久| 久久久777精品电影网影网| 狠狠色丁香婷婷综合久久片| 精品裸体舞一区二区三区| 久久精品久久99精品久久| 精品欧美乱码久久久久久| 夫妻av一区二区| 88在线观看91蜜桃国自产| 亚洲精品福利视频网站| 日本电影亚洲天堂一区| 综合久久综合久久| 91久久精品网| 亚洲sss视频在线视频| 日韩一级在线观看| 欧美老年两性高潮| 欧美一区二区在线免费观看| 欧美久久久久久蜜桃| 欧美午夜精品久久久| 欧美丝袜第三区| 精品国产一区二区三区四区四| 日韩视频免费直播| 国产拍欧美日韩视频二区| 亚洲青青青在线视频| 亚洲国产精品久久久男人的天堂| 五月激情六月综合| 激情久久五月天| 91久久精品一区二区二区| 91精品国产综合久久香蕉的特点 | 色诱视频网站一区| 97se亚洲国产综合在线| 亚洲成人一区二区在线观看| 五月婷婷久久丁香| 国产一区在线不卡| 亚洲色图视频网| 中文无字幕一区二区三区| 91美女片黄在线| 亚洲欧美日韩国产成人精品影院| 欧美三区在线观看| 国产91精品欧美| 亚洲综合久久av| 精品免费日韩av| 91免费视频网| 国产一区91精品张津瑜| 亚洲欧美电影一区二区| 99久久久久免费精品国产| 欧美日产国产精品| 亚洲女同女同女同女同女同69| 捆绑变态av一区二区三区| 欧美日韩国产一区二区三区地区| 欧美久久一区二区| 91麻豆精品国产91久久久资源速度| 欧美一区午夜精品| 视频在线观看一区| 中文字幕制服丝袜成人av| 欧美激情综合网| 国产乱理伦片在线观看夜一区| 欧美激情中文字幕一区二区| 欧美xxxx在线观看| 欧美艳星brazzers| 91在线视频网址| 国产成人三级在线观看| 麻豆久久一区二区| 天堂影院一区二区| 亚洲一级二级三级在线免费观看| 日本一区二区三区国色天香 | 欧美在线免费视屏| 成人午夜碰碰视频| 国产寡妇亲子伦一区二区| 日韩影视精彩在线| 亚洲午夜激情网站| 一区二区三区欧美亚洲| 国产精品福利在线播放| 中国av一区二区三区| 欧美经典一区二区| 欧美激情一区三区| 国产精品美女久久福利网站 | 风间由美一区二区av101| 老司机精品视频线观看86 | 欧美tickle裸体挠脚心vk| 欧美日韩国产123区| 欧美日韩在线不卡| 欧美丝袜自拍制服另类| 欧美在线|欧美| 精品视频一区二区不卡| 欧美欧美午夜aⅴ在线观看| 欧美日本一道本| 精品美女在线播放| 国产亚洲自拍一区| 最好看的中文字幕久久| 一区二区三区高清不卡| 亚洲综合男人的天堂| 亚洲国产综合在线| 蜜臀久久久99精品久久久久久| 美女网站一区二区| 国产精品影视在线| caoporen国产精品视频| 色婷婷激情久久| 91浏览器打开| 国产高清成人在线| 懂色av中文字幕一区二区三区| 亚洲h在线观看| 悠悠色在线精品| 一区二区三区国产| 亚洲激情在线播放| 亚洲自拍偷拍九九九| 久久久久久久电影| 国产女主播一区| 亚洲精品成a人| 亚洲国产成人高清精品| 亚洲人成人一区二区在线观看| 国产精品私人影院| 一区二区三区在线播| 午夜久久福利影院| 久久激情五月激情| 成人免费毛片嘿嘿连载视频| 在线视频一区二区免费| 精品人伦一区二区色婷婷| 日本成人在线看| 国产精品综合av一区二区国产馆| 亚洲另类在线视频| 亚洲国产欧美日韩另类综合| 精品无码三级在线观看视频| av欧美精品.com| 青青草国产成人av片免费| 亚洲理论在线观看| 亚洲一区二区视频| 一区二区在线看| 国产aⅴ综合色| 欧美少妇bbb| 国产精品久久久久久久久晋中| 亚洲成人av在线电影| 大桥未久av一区二区三区中文| 欧美网站一区二区| 综合网在线视频| 国内精品写真在线观看| 欧美日韩国产片| 国产精品伦理一区二区| 国内久久婷婷综合| 欧美日韩日日夜夜| 亚洲人快播电影网| 国产一区二区三区不卡在线观看| 91捆绑美女网站| 精品国产髙清在线看国产毛片| 亚洲国产精品自拍| 暴力调教一区二区三区| 欧美精品一区二区精品网| 午夜不卡在线视频| 欧美日韩在线免费视频| 亚洲色图在线视频| 99久久99久久精品免费观看| 久久久久久免费毛片精品| 日韩国产精品大片| 欧美色中文字幕| 亚洲va欧美va国产va天堂影院| 91婷婷韩国欧美一区二区| 国产精品福利影院| 国产成人免费在线观看不卡| 国产亚洲一区二区三区在线观看| 肉丝袜脚交视频一区二区| 欧美日韩午夜在线视频| 亚洲成av人在线观看| 欧美精品久久天天躁| 婷婷六月综合亚洲| 欧美一区二区免费观在线|