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

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

?? testsizetag.java

?? struts的源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Id: TestSizeTag.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.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.jsp.PageContext;

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

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

/**
 * Suite of unit tests for the
 * <code>org.apache.struts.taglib.bean.SizeTag</code> class.
 *
 */
public class TestSizeTag extends TaglibTestBase {
	protected final static String TEST_VAL = "Test Value";
	protected final static String REQUEST_KEY = "REQUEST_KEY";
	private String [] strings = { TEST_VAL, TEST_VAL, TEST_VAL };
	private Collection collection = new ArrayList();
	private Map map = new HashMap();

    /**
     * Defines the testcase name for JUnit.
     *
     * @param theName the testcase's name.
     */
    public TestSizeTag(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[] {TestSizeTag.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(TestSizeTag.class);
    }
    
    public void setUp() {
    	for (int i = 0; i < 3; i++) {
	    	collection.add(TEST_VAL + i);
		}
    	for (int i = 0; i < 3; i++) {
	    	map.put(REQUEST_KEY + i, TEST_VAL + i);
		}
    }
    
	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);
	}



	// Array
    public void testSizeTagNameArrayNoScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameArrayNoScope");
		request.setAttribute(REQUEST_KEY, strings);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameArrayNoScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNameArrayApplicationScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameArrayApplicationScope");
		pageContext.setAttribute(REQUEST_KEY, strings, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameArrayApplicationScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNameArraySessionScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameArraySessionScope");
		pageContext.setAttribute(REQUEST_KEY, strings, PageContext.SESSION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameArraySessionScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNameArrayRequestScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameArrayRequestScope");
		pageContext.setAttribute(REQUEST_KEY, strings, PageContext.REQUEST_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameArrayRequestScope(WebResponse response){
		formatAndTest("3", response.getText());
	}


    public void testSizeTagNamePropertyArrayNoScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayNoScope");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		sbft.setArray(strings);
		pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayNoScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArrayApplicationScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayApplicationScope");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		sbft.setArray(strings);
		pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayApplicationScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArraySessionScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArraySessionScope");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		sbft.setArray(strings);
		pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.SESSION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArraySessionScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArrayRequestScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayRequestScope");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		sbft.setArray(strings);
		pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.REQUEST_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayRequestScope(WebResponse response){
		formatAndTest("3", response.getText());
	}




    public void testSizeTagNamePropertyArrayNoScopeNested() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayNoScopeNested");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
		sbft.setArray(strings);
		sbft2.setNestedObject(sbft);
		pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayNoScopeNested(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArrayApplicationScopeNested() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayApplicationScopeNested");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
		sbft.setArray(strings);
		sbft2.setNestedObject(sbft);
		pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayApplicationScopeNested(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArraySessionScopeNested() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArraySessionScopeNested");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
		sbft.setArray(strings);
		sbft2.setNestedObject(sbft);
		pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.SESSION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArraySessionScopeNested(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNamePropertyArrayRequestScopeNested() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNamePropertyArrayRequestScopeNested");
		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
		SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
		sbft.setArray(strings);
		sbft2.setNestedObject(sbft);
		pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.REQUEST_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNamePropertyArrayRequestScopeNested(WebResponse response){
		formatAndTest("3", response.getText());
	}



	// Collection
    public void testSizeTagNameCollectionNoScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameCollectionNoScope");
		request.setAttribute(REQUEST_KEY, collection);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameCollectionNoScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNameCollectionApplicationScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameCollectionApplicationScope");
		pageContext.setAttribute(REQUEST_KEY, collection, PageContext.APPLICATION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
	}
	public void endSizeTagNameCollectionApplicationScope(WebResponse response){
		formatAndTest("3", response.getText());
	}

    public void testSizeTagNameCollectionSessionScope() throws IOException, ServletException{
		request.setAttribute("runTest", "testSizeTagNameCollectionSessionScope");
		pageContext.setAttribute(REQUEST_KEY, collection, PageContext.SESSION_SCOPE);
		pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品视频| 26uuu久久天堂性欧美| 日韩理论片在线| av一区二区三区黑人| 国产精品国产自产拍在线| 一本到不卡免费一区二区| 亚洲午夜视频在线观看| 欧美精品vⅰdeose4hd| 精品在线免费视频| 国产精品久久久久久久久久久免费看 | 99久免费精品视频在线观看| 国产精品女主播av| 欧美在线观看视频一区二区| 日韩电影免费在线| 久久你懂得1024| 色婷婷激情久久| 免费观看一级欧美片| 中文av一区二区| 欧美亚日韩国产aⅴ精品中极品| 亚洲18女电影在线观看| 欧美成人精品高清在线播放| 成人一区在线观看| 亚洲一区二区高清| 精品国产免费视频| 91亚洲资源网| 乱一区二区av| 亚洲欧洲日韩女同| 91精品国产全国免费观看| 国产一区二三区| 一区二区三区四区蜜桃| 精品国产91久久久久久久妲己| 99久久99久久久精品齐齐| 日本特黄久久久高潮| 欧美激情在线一区二区三区| 欧美日韩亚洲不卡| 国产激情视频一区二区三区欧美| 亚洲主播在线观看| 中文一区二区完整视频在线观看| 欧美三级在线视频| 粉嫩高潮美女一区二区三区| 视频一区视频二区在线观看| 欧美激情中文字幕一区二区| 欧美一区二区高清| 欧美系列亚洲系列| 色综合天天综合网天天看片| 日韩二区在线观看| 亚洲欧美精品午睡沙发| 久久久久久免费毛片精品| 欧美三级三级三级| 成人毛片视频在线观看| 免费在线一区观看| 曰韩精品一区二区| 国产精品久久久久久久久久久免费看| 欧美一区二区精品在线| 欧美亚洲综合网| 97超碰欧美中文字幕| 韩国毛片一区二区三区| 日日夜夜精品视频天天综合网| 亚洲欧美日韩人成在线播放| 国产网站一区二区| 精品国产乱码久久久久久闺蜜| 欧美巨大另类极品videosbest| 91农村精品一区二区在线| 丰满少妇久久久久久久| 国产美女在线精品| 紧缚奴在线一区二区三区| 人人爽香蕉精品| 香蕉成人伊视频在线观看| 一区二区三区小说| 一区二区三区欧美在线观看| 亚洲免费av观看| 亚洲欧美中日韩| 中文字幕亚洲在| 亚洲裸体xxx| 亚洲精品国产视频| 亚洲一区二区精品久久av| 亚洲一二三四在线| 亚洲va欧美va人人爽午夜| 亚洲va中文字幕| 欧美a级理论片| 久久av资源网| 国产经典欧美精品| 国产一区在线视频| 成人av在线电影| 91视频你懂的| 欧美午夜在线观看| 欧美一卡2卡3卡4卡| 日韩欧美电影一区| 中文字幕欧美一| 中文字幕一区在线观看| 国产精品乱码久久久久久| 亚洲欧洲精品一区二区三区 | 亚洲视频一区二区在线| 中文字幕一区在线观看视频| 亚洲欧美一区二区在线观看| 亚洲综合久久久久| 婷婷夜色潮精品综合在线| 久久国产综合精品| 国产91精品免费| 色一情一乱一乱一91av| 7777精品伊人久久久大香线蕉的| 日韩精品一区二区三区老鸭窝| 久久久久国产精品厨房| 亚洲特黄一级片| 日韩电影在线一区二区| 国产a视频精品免费观看| 91麻豆精品国产91久久久久久久久| 日韩欧美一级精品久久| 国产三级一区二区| 亚洲激情校园春色| 全部av―极品视觉盛宴亚洲| 国产成人综合在线观看| 欧美中文字幕亚洲一区二区va在线| 欧美一级片在线| 国产精品国产自产拍高清av王其| 夜夜揉揉日日人人青青一国产精品| 天堂va蜜桃一区二区三区| 国产成人啪免费观看软件| 欧美午夜影院一区| 国产欧美久久久精品影院| 亚洲国产精品久久人人爱| 精品中文字幕一区二区小辣椒| 91亚洲精品乱码久久久久久蜜桃| 欧美日韩视频在线一区二区 | 亚洲精品乱码久久久久久| 男女男精品视频| 色吧成人激情小说| 久久综合九色综合97婷婷女人 | 亚洲电影欧美电影有声小说| 国产一区视频网站| 欧美性色欧美a在线播放| 国产亚洲成aⅴ人片在线观看| 亚洲丰满少妇videoshd| 懂色av中文字幕一区二区三区| 欧美日韩二区三区| 国产精品久久久爽爽爽麻豆色哟哟| 蜜臀av性久久久久蜜臀aⅴ| 99精品国产91久久久久久| 亚洲精品一区二区三区四区高清 | 亚洲精品一区二区在线观看| 亚洲精品乱码久久久久久久久| 国产高清一区日本| 欧美成人三级电影在线| 亚洲综合成人在线视频| 成人国产精品免费观看| 精品国产一区二区在线观看| 亚洲成人777| 日本高清免费不卡视频| 国产精品久久二区二区| 精品亚洲欧美一区| 88在线观看91蜜桃国自产| 亚洲综合区在线| 色系网站成人免费| 日韩一区在线看| 99久久久久久| 中文字幕精品在线不卡| 国产高清不卡一区二区| 精品日韩99亚洲| 日本成人在线看| 91精品国产麻豆国产自产在线 | 日韩免费一区二区三区在线播放| 亚洲一区二区三区四区在线| 日本国产一区二区| 亚洲精品免费一二三区| 色婷婷亚洲精品| 美日韩一级片在线观看| 欧美日韩另类一区| 日韩经典中文字幕一区| 欧美一级在线观看| 精品一二三四区| 久久久久久97三级| 成人午夜精品在线| 国产精品初高中害羞小美女文| 午夜婷婷国产麻豆精品| 欧美日韩一区二区三区四区| 亚洲午夜一区二区三区| 欧美精品九九99久久| 男女性色大片免费观看一区二区| 日韩欧美视频一区| 精品影视av免费| 欧美激情中文字幕一区二区| 93久久精品日日躁夜夜躁欧美| 1000部国产精品成人观看| 在线观看一区不卡| 日韩成人av影视| 欧美一区二区久久| 国产suv精品一区二区883| 中文字幕综合网| 欧美日韩国产美| 国模无码大尺度一区二区三区| 国产精品私人影院| 91搞黄在线观看| 免费观看在线综合色| 久久久久99精品一区| 成人丝袜高跟foot| 亚洲一卡二卡三卡四卡| 精品剧情在线观看| 91丨porny丨首页| 麻豆成人久久精品二区三区小说| 国产午夜精品在线观看|