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

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

?? testgreaterequaltag.java

?? struts的源代碼
?? JAVA
字號:
/*
 * $Id: TestGreaterEqualTag.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.logic;

import javax.servlet.ServletException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.cactus.JspTestCase;
import org.apache.cactus.WebRequest;
import org.apache.struts.util.LabelValueBean;

/**
 * Suite of unit tests for the
 * <code>org.apache.struts.taglib.logic.GreaterEqualTag</code> class.
 *
 */
public class TestGreaterEqualTag extends JspTestCase {
	
    protected final static String COOKIE_KEY = "org.apache.struts.taglib.logic.COOKIE_KEY";
    protected final static String HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY";
    protected final static String PARAMETER_KEY = "org.apache.struts.taglib.logic.PARAMETER_KEY";
    protected final static String GREATER_VAL = "5";
    protected final static String LESSER_VAL = "5";


    /**
     * Defines the testcase name for JUnit.
     *
     * @param theName the testcase's name.
     */
    public TestGreaterEqualTag(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[] {TestGreaterEqualTag.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(TestGreaterEqualTag.class);
    }

    //----- Test initApplication() method --------------------------------------
	
    /**
     * Create cookie for testCookiePresent method test.
    */
    /* FIXME: Cactus does not send cookies?
    public void beginCookieGreaterEqual(WebRequest testRequest) {
       testRequest.addCookie(COOKIE_KEY, GREATER_VAL);
    }
    */

    /**
     * Create header for testHeaderGreaterEqual method test.
    */
    public void beginHeaderGreaterEqual(WebRequest testRequest) {
       testRequest.addHeader(HEADER_KEY, GREATER_VAL);
    }

    /**
     * Create header for testParameterGreaterEqual method test.
    */
    public void beginParameterGreaterEqual(WebRequest testRequest) {
       testRequest.addParameter(PARAMETER_KEY, GREATER_VAL);
    }

    /**
     * Verify the value stored in a cookie using <code>GreaterEqualTag</code>.
    */
    /* FIXME: Cactus does not send cookies?
    public void testCookieGreaterEqual() throws ServletException,  JspException {
        GreaterEqualTag ge = new GreaterEqualTag();
        ge.setPageContext(pageContext);
        ge.setCookie(COOKIE_KEY);
        ge.setValue(LESSER_VAL);

        assertTrue(
        	"Cookie Value (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }
    */
    
    /**
     * Verify the value stored in header using <code>GreaterEqualTag</code>.
    */
    public void testHeaderGreaterEqual() throws ServletException,  JspException {
        GreaterEqualTag ge = new GreaterEqualTag();
        ge.setPageContext(pageContext);
        ge.setHeader(HEADER_KEY);
        ge.setValue(LESSER_VAL);

        assertTrue(
        	"Header Value (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }

    /**
     * Verify the value stored in parameter using <code>GreaterEqualTag</code>.
    */
    public void testParameterGreaterEqual() throws ServletException,  JspException {
        GreaterEqualTag ge = new GreaterEqualTag();
        ge.setPageContext(pageContext);
        ge.setParameter(PARAMETER_KEY);
        ge.setValue(LESSER_VAL);

        assertTrue(
        	"Parameter Value (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }
    

    /**
     * Testing <code>GreaterEqualTag</code> using name attribute in
     * the application scope.
    */
    public void testApplicationScopeNameGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testApplicationScopeNameGreaterEqual";
		Integer itgr = new Integer(GREATER_VAL);
		
		pageContext.setAttribute(testKey, itgr, PageContext.APPLICATION_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("application");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Application scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }

    /**
     * Testing <code>GreaterEqualTag</code> using name attribute in
     * the session scope.
    */
    public void testSessionScopeNameGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testSessionScopeNameGreaterEqual";
		Integer itgr = new Integer(GREATER_VAL);
		
		pageContext.setAttribute(testKey, itgr, PageContext.SESSION_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("session");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Session scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }

    /**
     * Testing <code>GreaterEqualTag</code> using name attribute in
     * the request scope.
    */
    public void testRequestScopeNameGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testRequestScopeNameGreaterEqual";
		Integer itgr = new Integer(GREATER_VAL);
		
		pageContext.setAttribute(testKey, itgr, PageContext.REQUEST_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("request");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Request scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
        	ge.condition());
    }




    /**
     * Testing <code>GreaterEqualTag</code> using name and property attribute in
     * the application scope.
    */
    public void testApplicationScopePropertyGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testApplicationScopePropertyGreaterEqual";
		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
		
		pageContext.setAttribute(testKey, lvb, PageContext.APPLICATION_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("application");
		ge.setProperty("value");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
        	ge.condition());
    }

    /**
     * Testing <code>GreaterEqualTag</code> using name and property attribute in
     * the session scope.
    */
    public void testSessionScopePropertyGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testSessionScopePropertyGreaterEqual";
		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
		
		pageContext.setAttribute(testKey, lvb, PageContext.SESSION_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("session");
		ge.setProperty("value");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
        	ge.condition());
    }
    
    /**
     * Testing <code>GreaterEqualTag</code> using name and property attribute in
     * the request scope.
    */
    public void testRequestScopePropertyGreaterEqual() 
    	throws ServletException,  JspException {
    
        GreaterEqualTag ge = new GreaterEqualTag();

		String testKey = "testRequestScopePropertyGreaterEqual";
		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
		
		pageContext.setAttribute(testKey, lvb, PageContext.REQUEST_SCOPE);
		ge.setPageContext(pageContext);
		ge.setName(testKey);
		ge.setScope("request");
		ge.setProperty("value");
		ge.setValue(LESSER_VAL);

        assertTrue(
        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
        	ge.condition());
    }
    
    
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av中文在线观看| 粉嫩av亚洲一区二区图片| 国产欧美中文在线| 欧美三级日本三级少妇99| 国产酒店精品激情| 亚洲v中文字幕| 亚洲视频在线一区二区| xnxx国产精品| 日韩一区二区在线观看视频 | 另类小说欧美激情| 亚洲一二三区不卡| 中文字幕一区二区三区不卡在线 | 99久久婷婷国产综合精品| 蜜臀久久久久久久| 午夜精品影院在线观看| 国产精品美女www爽爽爽| 精品对白一区国产伦| 欧美另类一区二区三区| 欧美在线观看视频一区二区三区 | 在线影院国内精品| 丁香五精品蜜臀久久久久99网站| 美女在线视频一区| 日韩精品欧美精品| 午夜精品福利在线| 亚洲一区二区在线观看视频| 亚洲欧美日韩精品久久久久| 中文字幕欧美激情一区| 久久影视一区二区| 精品国产一区二区三区av性色| 777久久久精品| 欧美日韩免费视频| 在线观看视频一区二区| 色成年激情久久综合| 99精品国产视频| 91麻豆精品在线观看| 97精品视频在线观看自产线路二| av爱爱亚洲一区| 91一区二区在线观看| 99久久综合色| 色综合天天做天天爱| 一本色道久久综合亚洲aⅴ蜜桃| 99国产精品久久久久久久久久久 | 国产一区二区精品久久| 韩国女主播一区| 国产精品自拍在线| 99视频在线精品| 色猫猫国产区一区二在线视频| 色激情天天射综合网| 欧美亚洲国产bt| 91精品中文字幕一区二区三区| 欧美一区二区女人| 久久久亚洲午夜电影| 欧美高清在线一区二区| 综合久久国产九一剧情麻豆| 一区二区三区自拍| 日韩电影一区二区三区四区| 老司机精品视频线观看86| 国产精品一区二区三区99| 成人久久18免费网站麻豆| 91色婷婷久久久久合中文| 欧美午夜影院一区| 欧美变态口味重另类| 中文一区二区在线观看| 一区二区三区四区中文字幕| 日韩精品一级中文字幕精品视频免费观看 | 国产不卡视频在线观看| 91色在线porny| 91精品国产综合久久精品图片 | 成人av电影在线网| 在线一区二区三区| 精品久久免费看| 综合久久久久久| 日本三级韩国三级欧美三级| 国产成人丝袜美腿| 色伊人久久综合中文字幕| 日韩一二三区视频| 国产精品成人网| 美女视频黄a大片欧美| 成人免费视频caoporn| 欧美三级电影在线看| 久久久影院官网| 亚洲福利一区二区| 国产91富婆露脸刺激对白| 欧美在线免费播放| 中文字幕久久午夜不卡| 五月激情六月综合| 高清beeg欧美| 欧美精品第一页| 国产精品国产三级国产aⅴ入口| 亚洲成人免费影院| www.欧美色图| 精品对白一区国产伦| 亚洲愉拍自拍另类高清精品| 国产精品综合网| 久久亚洲精精品中文字幕早川悠里| 国产精品高潮呻吟久久| 免费久久99精品国产| 色天天综合色天天久久| 精品动漫一区二区三区在线观看| 一区二区欧美在线观看| 国产盗摄视频一区二区三区| 欧美男同性恋视频网站| 一区二区中文视频| 激情六月婷婷久久| 3d成人动漫网站| 亚洲午夜精品在线| jvid福利写真一区二区三区| 久久亚洲欧美国产精品乐播| 五月激情六月综合| 欧美日精品一区视频| 最近日韩中文字幕| 成人国产精品免费网站| 久久久亚洲精华液精华液精华液| 美女视频黄久久| 欧美一区二区高清| 午夜视频一区二区三区| 日本精品免费观看高清观看| 日韩一区欧美一区| 成人毛片在线观看| 国产精品久久夜| 成人一区二区三区视频在线观看| 精品久久久久久综合日本欧美| 青青草伊人久久| 欧美一区二区三区四区久久| 日韩精品免费专区| 欧美日韩视频专区在线播放| 亚洲午夜久久久久久久久电影网 | 国产日韩精品视频一区| 国产真实乱偷精品视频免| 精品国产免费久久| 久久99精品久久久久| 欧美一级久久久久久久大片| 日韩成人一级片| 91精品国产入口在线| 青青草原综合久久大伊人精品优势| 欧美一区二区视频在线观看2020 | 亚洲综合999| 欧美性三三影院| 亚洲无人区一区| 欧美日韩国产一区| 视频一区免费在线观看| 欧美一区二区三区日韩| 乱一区二区av| 国产色产综合产在线视频| 成人午夜av电影| 亚洲人成影院在线观看| 欧洲精品在线观看| 午夜精品免费在线| 欧美一卡2卡三卡4卡5免费| 久久国内精品自在自线400部| 欧美大片一区二区| 国产精品一区二区三区99| 国产精品毛片久久久久久| 91麻豆国产精品久久| 亚洲一区二区四区蜜桃| 51午夜精品国产| 国产中文字幕精品| 日韩美女视频一区二区| 日本丰满少妇一区二区三区| 日韩精品三区四区| 久久久亚洲综合| 91久久一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 久久久久久久久久久久久女国产乱| aaa欧美色吧激情视频| 亚洲一区二区在线免费看| 欧美va在线播放| 99久久精品免费观看| 国产成人在线观看| **欧美大码日韩| 91麻豆精品国产91久久久使用方法| 国内欧美视频一区二区| 亚洲乱码国产乱码精品精的特点| 欧美日韩久久一区二区| 国产一二精品视频| 一区二区高清视频在线观看| 日韩欧美国产综合在线一区二区三区| 成人一区二区在线观看| 视频一区欧美精品| 中文字幕亚洲综合久久菠萝蜜| 欧美日本一区二区三区四区| 国产精品一级在线| 五月婷婷久久综合| 国产精品拍天天在线| 91麻豆精品国产91久久久久| 99re视频这里只有精品| 奇米精品一区二区三区在线观看一| 国产精品久久久久一区二区三区共| 欧美日韩久久久一区| 不卡电影一区二区三区| 蜜桃av一区二区三区电影| 亚洲欧美日韩国产手机在线| 精品理论电影在线| 欧美日免费三级在线| 成人激情综合网站| 精品综合久久久久久8888| 亚洲国产欧美日韩另类综合 | 青青草视频一区| 亚洲精品日日夜夜| 国产欧美一区二区三区沐欲 |