Raible's Wiki
Raible Designs AppFuseHomepage- Korean - Chinese - Italian - Japanese QuickStart Guide User Guide Tutorials Other ApplicationsStruts ResumeSecurity Example Struts Menu
Set your name in
UserPreferences
Referenced by
JSPWiki v2.2.33
Hide Menu |
This is version 215.
It is not the current version, and thus it cannot be edited. {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"); } } ]} Attachments:
|