Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2010 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/295783 to your computer and use it in GitHub Desktop.
Save anonymous/295783 to your computer and use it in GitHub Desktop.
public class PeopleTest {
private DynamicUserService userService;
private PageTester tester;
@Before
public void setUp() {
tester = new GaedoPageTester();
userService = tester.getService(DynamicUserService.class);
userService.create(new User("John"));
}
@Test
public void testPeoplePage() {
// Render the People page
Document doc = tester.renderPage("People");
// check that the allUsers component has been rendered
Assert.assertNotNull(doc.getElementById("allUsers"));
}
@Test
public void testJohnPeoplePage() {
// Render the People page
Document doc = tester.renderPage("People/John");
// check that the profile component has been rendered
Assert.assertNotNull(doc.getElementById("userProfile"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment