Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
TextFormattingRules
WhatIsWiki




JSPWiki v2.2.33

[RSS]


Hide Menu

SandBox


This is version 242. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]



public class UserWebTest extends WebTestCase {
  
    public UserWebTest(String name) {
        super(name);
        getTestContext().setBaseUrl("http://localhost:8080/myusers");
    }

    // should there be a setup method that adds a user
    // before each test/method is called?

    public void testWelcomePage() {
        beginAt("/");
        assertTitleEquals("MyUsers ~ Welcome");
    }
    
    public void testAddUser() {
        beginAt("/editUser.html");
        assertTitleEquals("MyUsers ~ User Details");
        setFormElement("firstName""Spring");
        setFormElement("lastName""User");
        submit("save");
        assertTextPresent("saved successfully");
    }
    
    public void testListUsers() {
        beginAt("/users.html");     
        
        // check that table is present
        assertTablePresent("userList");

        // check that a set of strings are present somewhere in table
        assertTextInTable("userList",
                          new String[] {"Spring""User"});
    }
    
    public void testEditUser() {
          beginAt("/editUser.html?id=1");
          assertFormElementEquals("firstName""Spring");
          submit("save");
          assertTitleEquals("MyUsers ~ User List");
    }
    
    public void testDeleteUser() {
        beginAt("/editUser.html?id=1");
        assertTitleEquals("MyUsers ~ User Details");
        submit("delete");
        assertTitleEquals("MyUsers ~ User List");
    }
}
http://www.hmc-wiremesh.com http://www.china-hshui.com http://www.galvanized-wire.org http://www.wiremesh-wanda.com http://www.rql-wiremesh.com http://www.mesh-wire.com http://www.mesh-wire.org http://www.china-wiremesh.com http://www.mesh-fence.com http://www.agriculturetools.com http://www.chinamusicalinstrument.com http://www.bj-sd.com 机票 http://www.tmrr.com 商标,商标注册 http://www.zgpt.cn/pro1.htm 发电机 http://www.zgpt.cn/pro2.htm 发电机组,发电机 http://www.zgpt.cn/showroom.htm 柴油发电机 http://www.omeida.com/omdhtm/cindex/course/course.htm 英语培训 http://www.omeida.com/omdhtm/cindex/course/course.htm 英语口语 http://www.dongdao.net 设计,平面设计,广告设计 http://www.dongdao.net/main04.htm CI设计,设计 http://www.dongdao.net/main04.htm VI设计,设计 http://www.dongdao.net/sheji.htm 设计 http://www.dongdao.net/pingmiansheji.htm 平面设计 http://www.dongdao.net/guanggaosheji.htm 广告设计 http://www.dongdao.net/ci.htm CI设计 http://www.dongdao.net/vi.htm VI设计 http://www.dongdao.net/main04.htm 标志设计,设计 http://www.dongdao.net/main04-02.htm 包装设计 http://mesh.freewebpage.org 设计 http://wireandmesh.freewebpage.org 广告设计 http://meshwire.freewebpage.org 平面设计 http://www.xinchen.net.cn 机柜 http://www.xinchen.net.cn/LCD/1.htm 切换器 http://www.xinchen.net.cn/avocent/index.htm Avocent http://www.xinchen.net.cn/avocent/index.htm kvm http://www.xinchen.net.cn/kvm.htm kvm http://www.pm.tsinghua.edu.cn 项目管理 http://www.8848flower.com china flower http://www.8848flower.com china flowers http://www.jinyibei.com.cn 单片机 http://www.glory-vision.com 投影机 http://www.bjkhp.com 商标,专利,专利代理 http://www.bjkhp.com/operation.asp 商标代理 http://www.kangxin.com 商标,专利,知识产权 http://www.glory-vision.com 投影机 http://www.glory-vision.com 会议室工程,等离子显示器 http://www.jinyibei.com.cn 单片机] http://www.jinyibei.com.cn/chanpin/bcq/vlp-58A.htm 编程器 http://www.jinyibei.com.cn/chaxun/arm.htm ARM http://www.fashuo300.com 考研,法律硕士,法硕 http://www.approachina.com 管理咨询,管理咨询公司 http://www.creavic.com.cn/ois/usersites/chengwei/index.jsp 管理咨询,管理顾问 http://www.jzhrb.com.cn 减肥,美容 http://www.51zhengxing.net 美容,整形,整容 http://www.51zhengxing.net/2-zxjf.htm 减肥,瘦身 http://www.51zhengxing.net/2-zxxm.htm 隆胸,丰胸 http://www.melucky.com 门禁,一卡通,停车场 http://www.ychzn.com/DKmjjianjie.htm 门禁 http://www.ychzn.com/suo_elem.htm 电子锁 http://www.peak-e.com/cpyxt/mj.asp 门禁 http://www.peak-e.com/cpyxt/yktxt.asp 一卡通 http://www.peak-e.com/cpyxt/tcc.asp 停车场 http://www.tonzh.com smt,回流焊 http://www.cnsec.cn/product/firewall/NS-5GT.htm netscreen http://www.cnsec.cn/product/1firewall.htm 防火墙 http://www.cnsec.cn/product/1fortinet.htm 防毒墙 http://www.protech.net.cn 负载均衡,RADWARE,ALTEON http://www.zt148.com 律师,律师事务所,法律咨询 http://www.148-law.com 律师 http://www.148-law.com 律师事务所 http://www.148-law.com/message.htm 法律咨询 http://www.148-law.com/card/card1.htm 法律顾问 http://www.huihualin.com/sclyj.htm 水处理 http://www.rotek.com.cn/1024-768.htm 水处理 http://www.rotek.com.cn/1024-768.htm 净水设备 http://www.rotek.com.cn/1024-768.htm 软水机 http://www.bjerwai.com/modules/peixun/english.htm 英语 http://www.bjerwai.com/modules/peixun/french.htm 法语 [http://www.bjerwai.com/modules/ielts/index.htm 雅思] http://www.cfeenet.com/Examzhichen/default.asp 会计 http://www.cfeenet.com/ExamCPA/default.asp 注册会计师 http://www.sense.com.cn 加密狗,加密锁,软件加密 http://www.bjacca.com ACCA考试,ACCA培训 http://www.gyhx.com 视频光端机,视频编解码器,光纤收发器 http://www.ruilong.com.cn 健身器材,跑步机,按摩椅 http://www.dstmedia.com 视频会议,视频会议系统,视频会议设备 http://www.plcm.com.cn/defaultflash.asp 视频会议 http://www.plcm.com.cn/shipinhuiyi.htm 视频会议
Attachments:


Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:35 MST by 221.194.206.67.