[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Tue Jun 9 19:10:54 UTC 2009
gordonp
Tue Jun 9 15:10:54 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test
In directory dev.open-bio.org:/tmp/cvs-serv20175/src/main/ca/ucalgary/services/util/test
Modified Files:
XHTMLFormTestCase.java
Log Message:
Refactoring & MeSH test added
moby-live/Java/src/main/ca/ucalgary/services/util/test XHTMLFormTestCase.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java 2008/03/13 23:06:48 1.6
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java 2009/06/09 19:10:54 1.7
@@ -7,7 +7,8 @@
import java.util.*;
public class XHTMLFormTestCase extends TestCase{
- private final static String XHTMLFORM_RESOURCE = "ca/ucalgary/services/util/test/osprey_pcr.html";
+ private final static String XHTMLFORM_OSPREY_RESOURCE = "ca/ucalgary/services/util/test/osprey_pcr.html";
+ private final static String XHTMLFORM_MESH_RESOURCE = "ca/ucalgary/services/util/test/mesh.html";
// meta-data tests
private final static String SERVICE_CATEGORY = "Primers";
@@ -65,14 +66,14 @@
* See if the xhtml and moby spec class values are properly parsed
*/
public void testParsingBasic(){
- loadForm();
+ loadForm(XHTMLFORM_OSPREY_RESOURCE);
}
/**
* See if the meta data for the service is parsed correctly
*/
public void testMetaData(){
- XHTMLForm form = loadForm();
+ XHTMLForm form = loadForm(XHTMLFORM_OSPREY_RESOURCE);
assertTrue("The service type (" + form.getServiceType() +
") was not as expected (" + SERVICE_CATEGORY + ")",
SERVICE_CATEGORY.equals(form.getServiceType()));
@@ -96,7 +97,7 @@
* the Moby spec).
*/
public void testLogic(){
- XHTMLForm form = loadForm();
+ XHTMLForm form = loadForm(XHTMLFORM_OSPREY_RESOURCE);
String[] serviceNames = form.getServiceNames();
assertTrue("The number of services defined (" + serviceNames.length +
") was not as expected (" + NUM_SERVICES + ")",
@@ -229,9 +230,9 @@
}
- private XHTMLForm loadForm(){
- URL u = getClass().getClassLoader().getResource(XHTMLFORM_RESOURCE);
- assertNotNull("Could not find the test HTML form resource ("+XHTMLFORM_RESOURCE+")", u);
+ private XHTMLForm loadForm(String rez){
+ URL u = getClass().getClassLoader().getResource(rez);
+ assertNotNull("Could not find the test HTML form resource ("+rez+")", u);
XHTMLForm form = null;
try{
@@ -244,12 +245,19 @@
return form;
}
+
+ private void testSimple(){
+ XHTMLForm form = loadForm(XHTMLFORM_MESH_RESOURCE);
+
+ }
+
/**
* @return a test suite for all the test methods of this test case.
*/
public static Test suite() {
TestSuite suite = new TestSuite();
+ suite.addTest(new XHTMLFormTestCase("testSimple"));
suite.addTest(new XHTMLFormTestCase("testParsingBasic"));
suite.addTest(new XHTMLFormTestCase("testMetaData"));
suite.addTest(new XHTMLFormTestCase("testLogic"));
More information about the MOBY-guts
mailing list