A few more tests for IUPred
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Thu, 16 Jun 2011 14:30:04 +0000 (14:30 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Thu, 16 Jun 2011 14:30:04 +0000 (14:30 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4275 e3abac25-378b-4346-85de-24260fe3988d

testsrc/compbio/runner/disorder/IUPredTester.java

index d3d6e5e..242e90e 100644 (file)
@@ -176,14 +176,14 @@ public class IUPredTester {
        }\r
 \r
        \r
-       @Test(enabled = false, groups = {AllTestSuit.test_group_runner})\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testSetParameter() {\r
                assertEquals(iupred.getInput(), AllTestSuit.test_input);\r
                assertTrue(iupred.getParameters(null).getCommandString().trim().endsWith(AllTestSuit.test_input));\r
-               iupred.setParameter("all");\r
+               iupred.setParameter("long");\r
                assertEquals(iupred.getInput(), AllTestSuit.test_input);\r
                String cmd = iupred.getParameters(null).getCommandString().trim();  \r
-               assertTrue(cmd.endsWith("all"));\r
+               assertTrue(cmd.endsWith("long"));\r
                assertTrue(cmd.contains(AllTestSuit.test_input)); \r
        }\r
        \r
@@ -215,9 +215,11 @@ public class IUPredTester {
                        assertNotNull(al2);\r
                        assertEquals(al2.asMap().size(), 3);\r
                        assertEquals(al2.getNumberOfSeq(),3);\r
+                       \r
                        ScoreHolder sch = al2.getAnnotationForSequence("Foobar");\r
-                       Score sc = sch.getScoreByMethod("Long");\r
+                       assertEquals(sch.getNumberOfScores(), 3);\r
                        \r
+                       Score sc = sch.getScoreByMethod("Long");\r
                        assertEquals(sc.getMethod(), "Long");\r
                        assertTrue(sc.getRanges().isEmpty());\r
                        assertNotNull(sc.getScores());\r
@@ -237,10 +239,10 @@ public class IUPredTester {
                }\r
        }\r
 \r
-       @Test(enabled=false, groups = {AllTestSuit.test_group_runner})\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testRunLocallyWithParams() {\r
                try {\r
-                       iupred.setParameter("all");\r
+                       iupred.setParameter("short");\r
                        ConfiguredExecutable<IUPred> confIUPred = Configurator\r
                                        .configureExecutable(iupred, Executable.ExecProvider.Local);\r
 \r
@@ -251,7 +253,11 @@ public class IUPredTester {
                        assertNotNull(al1.getResults());\r
                        ScoreManager al2 = confIUPred.getResults();\r
        \r
-                       System.out.println("!!!"+al2.asMap());\r
+                       assertNotNull(al2.asMap());\r
+                       assertEquals(al2.asMap().size(), 3);\r
+                       ScoreHolder sch  = al2.getAnnotationForSequence("Foobar");\r
+                       assertNotNull(sch);\r
+                       assertEquals(sch.getNumberOfScores(), 1); \r
                        \r
                        /*\r
                        assertNotNull(al2);\r