[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Tue Feb 12 01:03:39 UTC 2008


gordonp
Mon Feb 11 20:03:39 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test
In directory dev.open-bio.org:/tmp/cvs-serv9550/src/main/ca/ucalgary/services/util/test

Modified Files:
	XHTMLFormTestCase.java 
Log Message:
Moved legacy text format specs to their own Map in order to make primary input specs as MobyServlet annotations expect
moby-live/Java/src/main/ca/ucalgary/services/util/test XHTMLFormTestCase.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java	2008/02/07 20:03:27	1.2
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/XHTMLFormTestCase.java	2008/02/12 01:03:39	1.3
@@ -30,7 +30,8 @@
     // param spec tests
     // primary
     private final static String inputHTMLParamName = "input_text";
-    private final static String inseq = "inseq:DNASequence:fasta";  //TODO: should we keep the fasta part in another map?
+    private final static String inseq = "inseq:DNASequence";  
+    private final static String inseqFormat = "fasta";
     private final static String primers = "primers:Collection(DNASequence)";
     // secondary
     private final static String bias = "product_bias:String:3:[5,3]";
@@ -103,6 +104,12 @@
 	assertTrue("The number of primary input parameters defined (" + primaryInputs.size() +
 		   ") was not as expected (" + NUM_PRIMARY_INPUTS + ")",
 		   NUM_PRIMARY_INPUTS == primaryInputs.size());
+
+	// Every primary in should have a legacy text format defined
+	Map<String,String> primaryInputFormats = form.getPrimaryInputFormats();
+	assertTrue("The number of primary input parameter formats defined (" + primaryInputFormats.size() +
+		   ") was not as expected (" + NUM_PRIMARY_INPUTS + ")",
+		   NUM_PRIMARY_INPUTS == primaryInputFormats.size());
 	
 	Map<String,String> secondaryInputs = form.getSecondaryInputs();
 
@@ -141,6 +148,10 @@
 		   primaryInputs.get(inputHTMLParamName) + ") was not the expected value '" + 
 		   inseq + "'",
 		   inseq.equals(primaryInputs.get(inputHTMLParamName)));
+	assertTrue("The value of format for the primary parameter 'inseq' (" +
+		   primaryInputFormats.get(inputHTMLParamName) + ") was not the expected value '" + 
+		   inseqFormat + "'",
+		   inseqFormat.equals(primaryInputFormats.get(inputHTMLParamName)));
 	assertTrue("The value of the output parameter 'primers' (" +
 		   outputs[0] + ") was not the expected value '" + 
 		   primers + "'",




More information about the MOBY-guts mailing list