You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/06/18 11:56:33 UTC
svn commit: r785992 -
/myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java
Author: lofwyr
Date: Thu Jun 18 09:56:32 2009
New Revision: 785992
URL: http://svn.apache.org/viewvc?rev=785992&view=rev
Log:
TOBAGO-765: Simplify test
Modified:
myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java
Modified: myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java?rev=785992&r1=785991&r2=785992&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java (original)
+++ myfaces/tobago/trunk/example/test/src/test/java/org/apache/myfaces/tobago/example/test/SimpleSeleniumTest.java Thu Jun 18 09:56:32 2009
@@ -17,34 +17,16 @@
* limitations under the License.
*/
-import com.thoughtworks.selenium.DefaultSelenium;
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
-public class SimpleSeleniumTest extends TestCase {
-
- private DefaultSelenium selenium;
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- selenium = createSeleniumClient("http://localhost:8080/");
- selenium.start();
- }
-
- @Override
- public void tearDown() throws Exception {
- selenium.stop();
- super.tearDown();
- }
-
- protected DefaultSelenium createSeleniumClient(String url) throws Exception {
- return new DefaultSelenium("localhost", 4444, "*firefox", url);
- }
+public class SimpleSeleniumTest extends SeleniumTest {
+ @Test
public void testHelloWorld() {
- selenium.open("http://localhost:8080/tobago-example-test/faces/simple.xhtml");
- assertEquals("Simple Test", selenium.getValue("page:in"));
- selenium.captureScreenshot(SimpleSeleniumTest.class.getName() + ".testHelloWorld.png");
+ selenium.open("http://localhost:8080/tobago-example-test/faces/simple.xhtml");
+ Assert.assertEquals("Simple Test", selenium.getValue("page:in"));
+ selenium.captureScreenshot(SimpleSeleniumTest.class.getName() + ".testHelloWorld.png");
}
}