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


Difference between version 318 and version 239:

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.passion.org.cn gmat]
[http://www.monarch.com.cn &#28070;&#28369;&#27833;]
[http://www.passion.org.cn gmat]
[http://www.zbbz.com/cpzs-1.htm &#30495;&#31354;&#27893;]
[http://www.bjhsdx.com &#26465;&#30721;&#25171;&#21360;&#26426;]
[http://www.sxcoal.com/en/index.asp coal]
[http://www.join-2008.com &#31508;&#35760;&#26412;&#30005;&#33041;, &#20108;&#25163;&#31508;&#35760;&#26412;]
[http://www.bjzufang.com &#31199;&#25151;]
[http://www.bjzufang.com &#21271;&#20140;&#31199;&#25151;]
[http://www.bjzufang.com/index.htm &#21271;&#20140;&#31199;&#25151;]
[http://www.bjzufang.com/index.htm &#31199;&#25151;]
[http://www.bj-sd.com &#26426;&#31080;]
[http://www.tmrr.com &#21830;&#26631;,&#21830;&#26631;&#27880;&#20876;]
[http://www.zgpt.cn/pro1.htm &#21457;&#30005;&#26426;]
[http://www.zgpt.cn/pro2.htm &#21457;&#30005;&#26426;&#32452;,&#21457;&#30005;&#26426;]
[http://www.zgpt.cn/showroom.htm &#26612;&#27833;&#21457;&#30005;&#26426;]
[http://www.omeida.com/omdhtm/cindex/course/course.htm &#33521;&#35821;&#22521;&#35757;]
[http://www.omeida.com/omdhtm/cindex/course/course.htm &#33521;&#35821;&#21475;&#35821;]
[http://www.dongdao.net &#35774;&#35745;,&#24179;&#38754;&#35774;&#35745;,&#24191;&#21578;&#35774;&#35745;]
[http://www.dongdao.net/main04.htm CI&#35774;&#35745;&#65292;&#35774;&#35745;]
[http://www.dongdao.net/main04.htm VI&#35774;&#35745;&#65292;&#35774;&#35745;]
[http://www.dongdao.net/sheji.htm &#35774;&#35745;]
[http://www.dongdao.net/pingmiansheji.htm &#24179;&#38754;&#35774;&#35745;]
[http://www.dongdao.net/guanggaosheji.htm &#24191;&#21578;&#35774;&#35745;]
[http://www.dongdao.net/ci.htm CI&#35774;&#35745;]
[http://www.dongdao.net/vi.htm VI&#35774;&#35745;]
[http://www.dongdao.net/main04.htm &#26631;&#24535;&#35774;&#35745;&#65292;&#35774;&#35745;]
[http://www.dongdao.net/main04-02.htm &#21253;&#35013;&#35774;&#35745;]
[http://dongdao.freewebpage.org &#35774;&#35745;]
[http://adsheji.freewebpage.org &#24191;&#21578;&#35774;&#35745;]
[http://pingmian.freewebpage.org &#24179;&#38754;&#35774;&#35745;]
[http://www.xinchen.net.cn &#26426;&#26588;]
[http://www.xinchen.net.cn/LCD/1.htm &#20999;&#25442;&#22120;]
[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 &#39033;&#30446;&#31649;&#29702;]
[http://www.8848flower.com china flower]
[http://www.8848flower.com china flowers]
[http://www.jinyibei.com.cn &#21333;&#29255;&#26426;]
[http://www.glory-vision.com &#25237;&#24433;&#26426;]
[http://www.bjkhp.com &#21830;&#26631;,&#19987;&#21033;&#65292;&#19987;&#21033;&#20195;&#29702;]
[http://www.bjkhp.com/operation.asp &#21830;&#26631;&#20195;&#29702;]
[http://www.kangxin.com &#21830;&#26631;,&#19987;&#21033;,&#30693;&#35782;&#20135;&#26435;]
[http://www.glory-vision.com &#25237;&#24433;&#26426;]
[http://www.glory-vision.com &#20250;&#35758;&#23460;&#24037;&#31243;,&#31561;&#31163;&#23376;&#26174;&#31034;&#22120;]
[http://www.jinyibei.com.cn &#21333;&#29255;&#26426;]]
[http://www.jinyibei.com.cn/chanpin/bcq/vlp-58A.htm &#32534;&#31243;&#22120;]
[http://www.jinyibei.com.cn/chaxun/arm.htm ARM]
[http://www.fashuo300.com &#32771;&#30740;,&#27861;&#24459;&#30805;&#22763;,&#27861;&#30805;]
[http://www.approachina.com &#31649;&#29702;&#21672;&#35810;,&#31649;&#29702;&#21672;&#35810;&#20844;&#21496;]
[http://www.creavic.com.cn/ois/usersites/chengwei/index.jsp &#31649;&#29702;&#21672;&#35810;,&#31649;&#29702;&#39038;&#38382;]
[http://www.jzhrb.com.cn &#20943;&#32933;,&#32654;&#23481;]
[http://www.51zhengxing.net &#32654;&#23481;,&#25972;&#24418;,&#25972;&#23481;]
[http://www.51zhengxing.net/2-zxjf.htm &#20943;&#32933;,&#30246;&#36523;]
[http://www.51zhengxing.net/2-zxxm.htm &#38534;&#33016;,&#20016;&#33016;]
[http://www.melucky.com &#38376;&#31105;,&#19968;&#21345;&#36890;,&#20572;&#36710;&#22330;]
[http://www.ychzn.com/DKmjjianjie.htm &#38376;&#31105;]
[http://www.ychzn.com/suo_elem.htm &#30005;&#23376;&#38145;]
[http://www.peak-e.com/cpyxt/mj.asp &#38376;&#31105;]
[http://www.peak-e.com/cpyxt/yktxt.asp &#19968;&#21345;&#36890;]
[http://www.peak-e.com/cpyxt/tcc.asp &#20572;&#36710;&#22330;]
[http://www.tonzh.com smt,&#22238;&#27969;&#28938;]
[http://www.cnsec.cn/product/firewall/NS-5GT.htm netscreen]
[http://www.cnsec.cn/product/1firewall.htm &#38450;&#28779;&#22681;]
[http://www.cnsec.cn/product/1fortinet.htm &#38450;&#27602;&#22681;]
[http://www.protech.net.cn &#36127;&#36733;&#22343;&#34913;,RADWARE,ALTEON]
[http://www.zt148.com &#24459;&#24072;,&#24459;&#24072;&#20107;&#21153;&#25152;,&#27861;&#24459;&#21672;&#35810;]
[http://www.148-law.com &#24459;&#24072;]
[http://www.148-law.com &#24459;&#24072;&#20107;&#21153;&#25152;]
[http://www.148-law.com/message.htm &#27861;&#24459;&#21672;&#35810;]
[http://www.148-law.com/card/card1.htm &#27861;&#24459;&#39038;&#38382;]
[http://www.huihualin.com/sclyj.htm &#27700;&#22788;&#29702;]
[http://www.rotek.com.cn/1024-768.htm &#27700;&#22788;&#29702;]
[http://www.rotek.com.cn/1024-768.htm &#20928;&#27700;&#35774;&#22791;]
[http://www.rotek.com.cn/1024-768.htm &#36719;&#27700;&#26426;]
[http://www.bjerwai.com/modules/peixun/english.htm &#33521;&#35821;]
[http://www.bjerwai.com/modules/peixun/french.htm &#27861;&#35821;]
[[http://www.bjerwai.com/modules/ielts/index.htm &#38597;&#24605;]
[http://www.cfeenet.com/Examzhichen/default.asp &#20250;&#35745;]
[http://www.cfeenet.com/ExamCPA/default.asp &#27880;&#20876;&#20250;&#35745;&#24072;]
[http://www.sense.com.cn &#21152;&#23494;&#29399;,&#21152;&#23494;&#38145;,&#36719;&#20214;&#21152;&#23494;]
[http://www.bjacca.com ACCA&#32771;&#35797;,ACCA&#22521;&#35757;]
[http://www.gyhx.com &#35270;&#39057;&#20809;&#31471;&#26426;,&#35270;&#39057;&#32534;&#35299;&#30721;&#22120;,&#20809;&#32420;&#25910;&#21457;&#22120;]
[http://www.ruilong.com.cn &#20581;&#36523;&#22120;&#26448;,&#36305;&#27493;&#26426;,&#25353;&#25705;&#26885;]
[http://www.dstmedia.com &#35270;&#39057;&#20250;&#35758;,&#35270;&#39057;&#20250;&#35758;&#31995;&#32479;,&#35270;&#39057;&#20250;&#35758;&#35774;&#22791;]
[http://www.plcm.com.cn/defaultflash.asp &#35270;&#39057;&#20250;&#35758;]
[http://www.plcm.com.cn/shipinhuiyi.htm &#35270;&#39057;&#20250;&#35758;]
[CreateDAO_zh]
[CreateDAO_sp]
[CreateManager_es]
[QuickStart Guide_es]
[SpringControllerUnitTest]
[δΈ­ζ–‡ζŒ‡ε—|Articles_zh]

Back to SandBox, or to the Page History.