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 215 and version 214:

At line 1 changed 1 line.
sandbox
[{Java2HtmlPlugin
public class UserWebTest extends WebTestCase {
public UserWebTest(String name) {
super(name);
getTestContext().setBaseUrl("http://localhost:8080/myusers");
}
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");
}
}
]}

Back to SandBox, or to the Page History.