1 11 package org.jboss.portlet.test.forums; 12 13 import net.sourceforge.jwebunit.WebTestCase; 14 15 19 public class AnonymousUserTestCase 20 extends WebTestCase 21 { 22 public AnonymousUserTestCase(String name) { 23 super(name); 24 getTestContext().setBaseUrl("http://localhost.localdomain:8080/portal"); 25 } 27 28 public void testReadIndex() 29 { 30 beginAt("/index.html?_id=page.default.forums"); 31 assertTextPresent("Dummy demo category"); 32 assertTextPresent("First forum"); 33 assertTextPresent("Second forum"); 34 } 35 36 public void testReadForum() 37 { 38 beginAt("/index.html?_id=page.default.forums"); 39 clickLinkWithText("First forum"); 40 assertTextPresent("First forum"); 41 assertTextPresent("Page <b>1</b>"); 42 assertLinkNotPresent("newTopic"); 43 } 44 45 46 } 47 | Popular Tags |