JWS-61 test demonstrating compound option value problem with JABAWS client
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 19 Jun 2013 14:28:03 +0000 (15:28 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 19 Jun 2013 14:33:11 +0000 (15:33 +0100)
testsrc/compbio/ws/client/TestAAConWS.java

index 19cd0b2..b6be0d7 100644 (file)
@@ -3,7 +3,7 @@ package compbio.ws.client;
 import static org.testng.Assert.assertEquals;\r
 import static org.testng.Assert.assertNotNull;\r
 import static org.testng.Assert.fail;\r
-\r
+import static org.testng.Assert.assertTrue;\r
 import java.io.File;\r
 import java.io.FileInputStream;\r
 import java.io.FileNotFoundException;\r
@@ -25,6 +25,8 @@ import compbio.data.sequence.SequenceUtil;
 import compbio.metadata.AllTestSuit;\r
 import compbio.metadata.JobSubmissionException;\r
 import compbio.metadata.LimitExceededException;\r
+import compbio.metadata.Option;\r
+import compbio.metadata.Preset;\r
 import compbio.metadata.PresetManager;\r
 import compbio.metadata.ResultNotAvailableException;\r
 import compbio.metadata.RunnerConfig;\r
@@ -135,6 +137,16 @@ public class TestAAConWS {
 \r
        }\r
        @Test(groups = {AllTestSuit.test_group_webservices})\r
+       public void testRecoverArgsForPreset() throws Exception {\r
+               PresetManager<AACon> presets = msaws.getPresets();\r
+               for (Preset<AACon> preset:presets.getPresets())\r
+               {\r
+                       List<Option<AACon>> args = preset.getArguments(msaws.getRunnerOptions());\r
+                       List opts = preset.getOptions();\r
+                       assertTrue(args.size()>=opts.size(),"Couldn't recover all Option items for preset "+preset.getName());\r
+               }\r
+       }\r
+       @Test(groups = {AllTestSuit.test_group_webservices})\r
        public void testPresetAnalize() throws FileNotFoundException, IOException {\r
 \r
                String CURRENT_DIRECTORY = SysPrefs.getCurrentDirectory()\r