From: pvtroshin Date: Thu, 16 Jun 2011 14:30:04 +0000 (+0000) Subject: A few more tests for IUPred X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=543657b077b18b8171fa5f3996daafb4a0b196f7;p=jabaws.git A few more tests for IUPred git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4275 e3abac25-378b-4346-85de-24260fe3988d --- diff --git a/testsrc/compbio/runner/disorder/IUPredTester.java b/testsrc/compbio/runner/disorder/IUPredTester.java index d3d6e5e..242e90e 100644 --- a/testsrc/compbio/runner/disorder/IUPredTester.java +++ b/testsrc/compbio/runner/disorder/IUPredTester.java @@ -176,14 +176,14 @@ public class IUPredTester { } - @Test(enabled = false, groups = {AllTestSuit.test_group_runner}) + @Test(groups = {AllTestSuit.test_group_runner}) public void testSetParameter() { assertEquals(iupred.getInput(), AllTestSuit.test_input); assertTrue(iupred.getParameters(null).getCommandString().trim().endsWith(AllTestSuit.test_input)); - iupred.setParameter("all"); + iupred.setParameter("long"); assertEquals(iupred.getInput(), AllTestSuit.test_input); String cmd = iupred.getParameters(null).getCommandString().trim(); - assertTrue(cmd.endsWith("all")); + assertTrue(cmd.endsWith("long")); assertTrue(cmd.contains(AllTestSuit.test_input)); } @@ -215,9 +215,11 @@ public class IUPredTester { assertNotNull(al2); assertEquals(al2.asMap().size(), 3); assertEquals(al2.getNumberOfSeq(),3); + ScoreHolder sch = al2.getAnnotationForSequence("Foobar"); - Score sc = sch.getScoreByMethod("Long"); + assertEquals(sch.getNumberOfScores(), 3); + Score sc = sch.getScoreByMethod("Long"); assertEquals(sc.getMethod(), "Long"); assertTrue(sc.getRanges().isEmpty()); assertNotNull(sc.getScores()); @@ -237,10 +239,10 @@ public class IUPredTester { } } - @Test(enabled=false, groups = {AllTestSuit.test_group_runner}) + @Test(groups = {AllTestSuit.test_group_runner}) public void testRunLocallyWithParams() { try { - iupred.setParameter("all"); + iupred.setParameter("short"); ConfiguredExecutable confIUPred = Configurator .configureExecutable(iupred, Executable.ExecProvider.Local); @@ -251,7 +253,11 @@ public class IUPredTester { assertNotNull(al1.getResults()); ScoreManager al2 = confIUPred.getResults(); - System.out.println("!!!"+al2.asMap()); + assertNotNull(al2.asMap()); + assertEquals(al2.asMap().size(), 3); + ScoreHolder sch = al2.getAnnotationForSequence("Foobar"); + assertNotNull(sch); + assertEquals(sch.getNumberOfScores(), 1); /* assertNotNull(al2);