At line 1 changed 1 line. |
[{Java2HtmlPlugin |
[this mailing list thread|http://nagoya.apache.org/eyebrowse/[email protected]&msgNo=451]. |
At line 3 changed 6 lines. |
public class UserWebTest extends WebTestCase { |
|
public UserWebTest(String name) { |
super(name); |
getTestContext().setBaseUrl("http://localhost:8080/myusers"); |
} |
[What is this SandBox?|WhatIsThisSandBox] |
At line 10 changed 2 lines. |
// should there be a setup method that adds a user |
// before each test/method is called? |
[{Java2HtmlPlugin |
At line 13 changed 19 lines. |
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"); |
import javax.naming.Context; |
import javax.naming.InitialContext; |
At line 33 changed 18 lines. |
// 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"); |
} |
import junit.framework.TestCase; |
|
import org.mockejb.MockContainer; |
import org.mockejb.SessionBeanDescriptor; |
import org.mockejb.jndi.MockContextFactory; |
import org.springframework.context.ApplicationContext; |
import org.springframework.context.support.ClassPathXmlApplicationContext; |
|
/** |
* Parent TestCase class for testing EJBs using MockEJB |
* |
* @author mraible |
* |
*/ |
public abstract class MockEJBTestCase extends TestCase { |
|
/** |
* This method sets up a MockContainer and allows you to deploy an EJB to |
* it. Override <code>onSetUp()</code> to add custom set-up behavior. |
* |
* @see #onSetUp() |
*/ |
protected final void setUp() throws Exception { |
MockContextFactory.setAsInitial(); |
|
Context ctx = new InitialContext(); |
ApplicationContext appCtx = |
new ClassPathXmlApplicationContext(getConfigLocations()); |
|
ctx.bind("java:comp/env/jdbc/appDS", appCtx.getBean("dataSource")); |
|
MockContainer mc = new MockContainer(ctx); |
SessionBeanDescriptor dd = getDeploymentDescriptor(); |
mc.deploy(dd); |
onSetUp(); |
} |
|
protected String[] getConfigLocations() { |
return new String[] { "classpath:/applicationContext.xml" }; |
} |
|
protected void onSetUp() throws Exception {} |
|
protected abstract SessionBeanDescriptor getDeploymentDescriptor(); |
At line 55 added 1 line. |
|
At line 53 changed 88 lines. |
[http://www.hmc-wiremesh.com ] |
[http://www.china-hshui.com ] |
[http://www.galvanized-wire.org] |
[http://www.wiremesh-wanda.com] |
[http://www.qrl-wiremesh.com] |
[http://www.mesh-wire.com coal] |
[http://www.mesh-wire.org 笔记本电脑, 二手笔记本] |
[http://www.bjzufang.com 租房] |
[http://www.bjzufang.com 北京租房] |
[http://www.bjzufang.com/index.htm 北京租房] |
[http://www.bjzufang.com/index.htm 租房] |
[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 视频会议] |
|
[CreateDAO_zh] |
[CreateDAO_sp] |
|
[CreateManager_es] |
|
[QuickStart Guide_es] |
|
[SpringControllerUnitTest] |
|
|
[δΈζζε|Articles_zh] |