A mcp-test/src/main/java/cardemo/CarDemo.java
A mcp-test/src/test/java/cardemo/CarDemoTest.java

- include automated test to use MCP to test the Ajax cardemo
This commit is contained in:
edburns%acm.org 2007-03-03 21:06:39 +00:00
Родитель 271006c970
Коммит 8c46d42fe4
3 изменённых файлов: 83 добавлений и 0 удалений

11
java/dist/build.xml поставляемый
Просмотреть файл

@ -187,12 +187,18 @@
</target>
<target name="copy.test.src" depends="prepare">
<!-- Populate the netbeans Test Packages -->
<copy todir="${dist.home}/test/automated/src/main/java">
<fileset dir="${source.home}/webclient/test/automated/src/classes">
<exclude name="**/*Bookmark*.java" />
<exclude name="**/*Preferences*.java" />
<exclude name="**/*Profile*.java" />
</fileset>
<fileset dir="${basedir}/mcp-test/src/test/java">
<include name="**/*.java" />
</fileset>
</copy>
<copy todir="${dist.home}/test/automated/src/main/resources">
<fileset dir="${source.home}/webclient/test/automated/src/test">
@ -200,8 +206,13 @@
</fileset>
</copy>
<!-- Populate the netbeans Source Packages -->
<copy todir="${dist.home}/test/manual/src/main/java">
<fileset dir="${source.home}/webclient/test/manual/src/classes" />
<fileset dir="${basedir}/mcp-test/src/main/java">
<include name="**/*.java" />
</fileset>
</copy>

29
java/dist/mcp-test/src/main/java/cardemo/CarDemo.java поставляемый Executable file
Просмотреть файл

@ -0,0 +1,29 @@
/*
* CarDemo.java
*
* Created on March 3, 2007, 2:58 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package cardemo;
/**
*
* @author edburns
*/
public class CarDemo {
/** Creates a new instance of CarDemo */
public CarDemo() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}
}

43
java/dist/mcp-test/src/test/java/cardemo/CarDemoTest.java поставляемый Executable file
Просмотреть файл

@ -0,0 +1,43 @@
/*
* CarDemoTest.java
* JUnit based test
*
* Created on March 3, 2007, 2:31 PM
*/
package cardemo;
import org.mozilla.mcp.MCP;
import org.mozilla.webclient.WebclientTestCase;
/**
*
* @author edburns
*/
public class CarDemoTest extends WebclientTestCase {
private MCP mcp = null;
public CarDemoTest(String testName) {
super(testName);
}
public void setUp() {
super.setUp();
mcp = new MCP();
try {
mcp.setAppData(getBrowserBinDir());
}
catch (Exception e) {
fail();
}
}
public void testCardemo() throws Exception {
mcp.getRealizedVisibleBrowserWindow();
mcp.blockingLoad("http://webdev1.sun.com/jsf-ajax-cardemo/faces/chooseLocale.jsp");
}
}