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

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

?? testnotequaltag.java

?? struts的源代碼
?? JAVA
字號:
/*
 * $Id: TestNotEqualTag.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.PageContext;
import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.cactus.JspTestCase;
import org.apache.cactus.WebRequest;

/**
 * Suite of unit tests for the
 * <code>org.apache.struts.taglib.logic.NotEqualTag</code> class.
 */
public class TestNotEqualTag 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 NotEqualTag net = null;
    protected static String testStringKey;
    protected static String testStringValue;
    protected static String testStringValue1;
    protected static String testIntegerKey;
    protected static Integer testIntegerValue;
    protected static Integer testIntegerValue1;

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

    public void setUp()
    {
        testStringKey = "testString";
        testStringValue = "abc";
        testStringValue1 = "abcd";
        testIntegerKey = "testInteger";
        testIntegerValue = new Integer(21);
        testIntegerValue1 = new Integer(testIntegerValue.intValue() + 1);

        net = new NotEqualTag();
        net.setPageContext(pageContext);
    }

    public void tearDown()
    {
        net = null;
    }

    /**
     * Create cookie for testCookieStringEquals method test.
    */
    /* FIXME: Cactus does not send cookies?
    public void beginCookieStringEquals(WebRequest testRequest) {
       testRequest.addCookie(COOKIE_KEY, "abc");
    }

    public void testCookieStringEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setCookie(COOKIE_KEY);
        net.setValue(testStringValue);

        assertEquals("Cookie string equals comparison", true, net.condition(0, 0));
    }
    */

    /**
     * Create cookie for testCookieStringNotEquals method test.
    */
    public void beginCookieStringNotEquals(WebRequest testRequest) {
       testRequest.addCookie(COOKIE_KEY, "abc");
    }

    public void testCookieStringNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setCookie(COOKIE_KEY);
        net.setValue(testStringValue1);

        assertEquals("Cookie string not equals comparison", false, net.condition(0, 0));
    }

    /**
     * Create cookie for testHeaderStringEquals method test.
    */
    public void beginHeaderStringEquals(WebRequest testRequest) {
       testRequest.addHeader(COOKIE_KEY, "abc");
    }

    public void testHeaderStringEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setHeader(COOKIE_KEY);
        net.setValue(testStringValue);

        assertEquals("Header string equals comparison", true, net.condition(0, 0));
    }

    /**
     * Create cookie for testHeaderStringNotEquals method test.
    */
    public void beginHeaderStringNotEquals(WebRequest testRequest) {
       testRequest.addHeader(COOKIE_KEY, "abc");
    }

    public void testHeaderStringNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setHeader(COOKIE_KEY);
        net.setValue(testStringValue1);

        assertEquals("Header string not equals comparison", false, net.condition(0, 0));
    }

    /**
     * Create cookie for testParameterStringEquals method test.
    */
    public void beginParameterStringEquals(WebRequest testRequest) {
       testRequest.addParameter(PARAMETER_KEY, "abc");
    }

    public void testParameterStringEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setParameter(PARAMETER_KEY);
        net.setValue(testStringValue);

        assertEquals("Parameter string equals comparison", true, net.condition(0, 0));
    }

    /**
     * Create cookie for testParameterStringNotEquals method test.
    */
    public void beginParameterStringNotEquals(WebRequest testRequest) {
       testRequest.addParameter(PARAMETER_KEY, "abc");
    }

    public void testParameterStringNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        net.setParameter(PARAMETER_KEY);
        net.setValue(testStringValue1);

        assertEquals("Parameter string not equals comparison", false, net.condition(0, 0));
    }

    /**
     * Verify that two <code>String</code>s match using the <code>NotEqualTag</code>.
     */
    public void testStringEquals() throws ServletException,  javax.servlet.jsp.JspException {
        request.setAttribute(testStringKey, testStringValue);
        net.setName(testStringKey);
        net.setValue(testStringValue);
        System.out.println("testing");
        assertEquals("String equals comparison", true, net.condition(0, 0));
    }

    /**
     * Verify that two <code>String</code>s do not match using the <code>NotEqualTag</code>.
     */
    public void testStringNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        request.setAttribute(testStringKey, testStringValue);
        net.setName(testStringKey);
        net.setValue(testStringValue1);

        assertEquals("String not equals comparison", false, net.condition(0, 0));
    }

    /**
     * Verify that an <code>Integer</code> and a <code>String</code>
     * match using the <code>NotEqualTag</code>.
     */
    public void testIntegerEquals() throws ServletException,  javax.servlet.jsp.JspException {
        request.setAttribute(testIntegerKey, testIntegerValue);
        net.setName(testIntegerKey);
        net.setValue(testIntegerValue.toString());

        assertEquals("Integer equals comparison", true, net.condition(0, 0));
    }

    /**
     * Verify that two <code>String</code>s do not match using the <code>NotEqualTag</code>.
     */
    public void testIntegerNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        request.setAttribute(testIntegerKey, testIntegerValue);
        net.setName(testIntegerKey);
        net.setValue(testIntegerValue1.toString());

        assertEquals("Integer equals comparison", false, net.condition(0, 0));
    }

    /**
     * Verify that there is an application scope String in scope using the <code>EqualTag</code>.
    */
    public void testApplicationScopeStringEquals() throws ServletException,  javax.servlet.jsp.JspException {
        String testKey = "testApplicationScopeStringEquals";

        pageContext.setAttribute(testKey, testStringValue, PageContext.APPLICATION_SCOPE);
        net.setPageContext(pageContext);
        net.setName(testKey);
        net.setScope("application");
        net.setValue(testStringValue);

        assertEquals("String in application scope equals", true, net.condition(0, 0));
    }

    /**
     * Verify that there is an application scope String that is not equal using the <code>EqualTag</code>.
    */
    public void testApplicationScopeStringNotEquals() throws ServletException,  javax.servlet.jsp.JspException {
        String testKey = "testApplicationScopeStringNotEquals";

        pageContext.setAttribute(testKey, testStringValue, PageContext.APPLICATION_SCOPE);
        net.setPageContext(pageContext);
        net.setName(testKey);
        net.setScope("application");
        net.setValue(testStringValue1);

        assertEquals("String in application scope not equals", false, net.condition(0, 0));
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国模一区二区三区| 亚洲丝袜自拍清纯另类| 国产日韩欧美精品一区| 亚洲视频狠狠干| 极品少妇xxxx偷拍精品少妇| 91丨九色丨国产丨porny| 日韩免费看的电影| 亚洲欧美日韩一区二区三区在线观看| 五月综合激情婷婷六月色窝| 成人av免费网站| 精品国产乱码久久久久久浪潮| 最新欧美精品一区二区三区| 国产一区二区h| 欧美区一区二区三区| 自拍偷拍国产精品| 国产最新精品精品你懂的| 欧美剧情片在线观看| 亚洲欧美日本在线| 国产成人在线视频网址| 欧美一区二区免费视频| 亚洲在线视频一区| jlzzjlzz国产精品久久| 国产夜色精品一区二区av| 老汉av免费一区二区三区| 欧美在线短视频| ㊣最新国产の精品bt伙计久久| 成人亚洲精品久久久久软件| 久久久久久夜精品精品免费| 久久99国产精品久久99| 久久综合久久99| 久久成人免费日本黄色| 7777精品伊人久久久大香线蕉 | www.亚洲在线| 精品国产123| 久久国产精品第一页| 欧美色男人天堂| 亚洲狠狠爱一区二区三区| 色视频一区二区| 亚洲欧美另类小说| 一本到不卡免费一区二区| 1区2区3区欧美| 91视频观看视频| 亚洲免费观看高清完整| 91国内精品野花午夜精品| 亚洲综合在线视频| 欧美亚洲综合色| 偷拍亚洲欧洲综合| 日韩精品中文字幕在线不卡尤物| 精品中文av资源站在线观看| 26uuu久久天堂性欧美| 国模套图日韩精品一区二区| 2023国产精品| 成人午夜在线免费| 综合久久一区二区三区| 欧美无乱码久久久免费午夜一区 | 精品粉嫩超白一线天av| 国产一区亚洲一区| 国产精品成人网| 欧美日韩在线播放三区| 日韩电影在线免费看| 欧美成人一区二区| 国产宾馆实践打屁股91| 亚洲色欲色欲www| 欧美日韩成人综合| 国产精品资源网站| 亚洲色图在线视频| 日韩一区二区免费在线观看| 国产aⅴ综合色| 亚洲一区在线电影| 精品av久久707| 欧美喷水一区二区| 精品一区二区三区在线观看| 国产欧美一区二区在线观看| 色哦色哦哦色天天综合| 美女诱惑一区二区| 中文字幕一区二区三区在线观看| 欧美午夜精品一区二区蜜桃| 国产在线精品国自产拍免费| 亚洲欧美日韩在线| 精品国产乱码久久久久久久久| 97精品国产露脸对白| 日韩福利电影在线观看| **性色生活片久久毛片| 精品国产免费人成电影在线观看四季 | 日韩一区二区在线看| 9色porny自拍视频一区二区| 日韩av中文字幕一区二区| 中文字幕国产一区| 日韩午夜在线影院| 欧美在线小视频| 处破女av一区二区| 精品中文字幕一区二区| 亚洲v日本v欧美v久久精品| 国产亚洲精品超碰| 91精品综合久久久久久| 欧美性猛片aaaaaaa做受| 国产成人免费高清| 裸体健美xxxx欧美裸体表演| 一区二区三区在线影院| 欧美国产精品一区二区| 欧美成人福利视频| 欧美日韩一级视频| 91麻豆视频网站| 成人看片黄a免费看在线| 久久99热这里只有精品| 丝袜a∨在线一区二区三区不卡| 国产精品国模大尺度视频| 久久精品人人爽人人爽| 欧美精品一区二区三区蜜桃| 777午夜精品视频在线播放| 91国内精品野花午夜精品| 91麻豆国产自产在线观看| 粉嫩欧美一区二区三区高清影视| 国产又粗又猛又爽又黄91精品| 奇米精品一区二区三区在线观看一 | 欧美一区二区在线视频| 色综合久久中文综合久久牛| 波多野结衣91| 国产成人综合在线观看| 高清av一区二区| 国产精一品亚洲二区在线视频| 久久99九九99精品| 久久精品国产**网站演员| 日韩高清欧美激情| 日韩精品1区2区3区| 美国一区二区三区在线播放| 日韩av中文字幕一区二区三区| 日本三级亚洲精品| 久久精品国产**网站演员| 国产一区二区日韩精品| 国产成人亚洲综合色影视| 国产aⅴ综合色| 色天使久久综合网天天| 欧美日韩一区在线| 日韩欧美国产成人一区二区| 久久一日本道色综合| 国产欧美一二三区| 《视频一区视频二区| 亚洲一区二区三区自拍| 日韩精品1区2区3区| 国模无码大尺度一区二区三区| 成人免费毛片嘿嘿连载视频| 91在线视频观看| 欧美日本精品一区二区三区| 日韩精品一区二区三区在线 | jiyouzz国产精品久久| 欧美在线小视频| 欧美v国产在线一区二区三区| 久久精品一区二区| 亚洲欧洲国产日韩| 日韩不卡一区二区三区| 国产成人av自拍| 在线日韩av片| 欧美不卡激情三级在线观看| 天天免费综合色| 国产精品一区二区不卡| 日本韩国视频一区二区| 日韩欧美在线网站| 自拍偷自拍亚洲精品播放| 麻豆国产精品官网| 94色蜜桃网一区二区三区| 91精品国产91久久久久久最新毛片| 国产亲近乱来精品视频| 亚洲成在线观看| 国产成人免费av在线| 91精品国产综合久久久久久久久久 | 成人黄色网址在线观看| 欧美日韩在线播放三区四区| 国产色一区二区| 天堂一区二区在线免费观看| 国产a视频精品免费观看| 欧美丰满少妇xxxbbb| 国产精品国产a级| 日韩av在线播放中文字幕| av在线综合网| 26uuu色噜噜精品一区二区| 亚洲综合男人的天堂| 成人性生交大片免费看中文网站| 51精品国自产在线| 亚洲精选在线视频| 国产成人精品免费网站| 日韩欧美中文字幕公布| 性欧美疯狂xxxxbbbb| 色婷婷精品大视频在线蜜桃视频| 2014亚洲片线观看视频免费| 日韩成人免费看| 欧美亚洲尤物久久| 亚洲欧美视频在线观看| 波多野结衣亚洲一区| 国产亚洲午夜高清国产拍精品| 免费不卡在线观看| 欧美日韩亚洲国产综合| 亚洲人亚洲人成电影网站色| 欧美日韩国产另类不卡| 最新热久久免费视频| 99在线热播精品免费| 国产精品国模大尺度视频| 成人免费视频免费观看| 国产欧美一区二区精品性色| 国产自产v一区二区三区c|