From: Jim Procter Date: Wed, 19 Jun 2013 14:42:50 +0000 (+0100) Subject: JWS-50 patch AAConWS test for refactoring of calculation parameters to a series of... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=08c0c578427def351c7fe3cb6bc1f9cc3eb1bce7;p=jabaws.git JWS-50 patch AAConWS test for refactoring of calculation parameters to a series of options --- diff --git a/testsrc/compbio/ws/client/TestAAConWS.java b/testsrc/compbio/ws/client/TestAAConWS.java index b6be0d7..d54e67f 100644 --- a/testsrc/compbio/ws/client/TestAAConWS.java +++ b/testsrc/compbio/ws/client/TestAAConWS.java @@ -9,6 +9,7 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.net.ConnectException; +import java.util.ArrayList; import java.util.List; import javax.xml.ws.WebServiceException; @@ -213,21 +214,23 @@ public class TestAAConWS { // System.out.println(options.getArguments()); try { - options.getArgument("Calculation method").setDefaultValue("SMERFS"); + List> args = new ArrayList>(); + Option arg,normarg; + args.add(arg=options.getArgument("SMERFS")); + args.add(normarg=options.getArgument("Normalize")); + arg.setValue(arg.getPossibleValues().get(0)); // options.getArgument("SMERFS Column Scoring Method") // .setDefaultValue("MAX_SCORE"); // options.getArgument("SMERFS Gap Threshhold").setDefaultValue("1"); - String jobId = msaws.customAnalize(fsl, options.getArguments()); + String jobId = msaws.customAnalize(fsl, args); ScoreManager result = msaws.getAnnotation(jobId); assertNotNull(result); assertEquals(result.asSet().size(), 1); assertEquals(result.asSet().iterator().next().getScores().get(0), 0.698f); - - options.getArgument("Calculation method").setDefaultValue("SMERFS"); - options.removeArgument("Normalize"); - System.out.println(options); - jobId = msaws.customAnalize(fsl, options.getArguments()); + args.remove(normarg); // remove normalization argument + // System.out.println(options); + jobId = msaws.customAnalize(fsl, args); result = msaws.getAnnotation(jobId); assertNotNull(result); assertEquals(result.asSet().size(), 1);