JAL-3174 Merging in some test filename-case fixes
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 17 Dec 2018 15:16:57 +0000 (15:16 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 17 Dec 2018 15:16:57 +0000 (15:16 +0000)
test/jalview/ext/htsjdk/TestHtsContigDb.java
test/jalview/ext/jmol/JmolParserTest.java

index 28c5cf0..ad9bf03 100644 (file)
@@ -44,12 +44,12 @@ public class TestHtsContigDb
   @Test(groups = "Functional")
   public final void testGetSequenceProxy() throws Exception
   {
-    String pathname = "test/jalview/ext/htsjdk/pgmb.fasta";
+    String pathname = "test/jalview/ext/htsjdk/pgmB.fasta";
     HtsContigDb db = new HtsContigDb("ADB", new File(pathname));
-    
+
     assertTrue(db.isValid());
     assertTrue(db.isIndexed()); // htsjdk opens the .fai file
-    
+
     SequenceI sq = db.getSequenceProxy("Deminut");
     assertNotNull(sq);
     assertEquals(sq.getLength(), 606);
@@ -60,7 +60,7 @@ public class TestHtsContigDb
     sq = db.getSequenceProxy("PPL_06716");
     assertNotNull(sq);
     assertEquals(sq.getLength(), 602);
-    
+
     // dict = db.getDictionary(f, truncate))
   }
 
@@ -73,7 +73,7 @@ public class TestHtsContigDb
     expectedExceptions = java.lang.IllegalArgumentException.class)
   public final void testGetSequenceProxy_indexed()
   {
-    String pathname = "test/jalview/ext/htsjdk/pgmb.fasta.fai";
+    String pathname = "test/jalview/ext/htsjdk/pgmB.fasta.fai";
     new HtsContigDb("ADB", new File(pathname));
     fail("Expected exception opening .fai file");
   }
@@ -92,16 +92,20 @@ public class TestHtsContigDb
   @Test(groups = "Functional")
   public void testCreateFastaSequenceIndex() throws IOException
   {
-    File fasta = new File("test/jalview/ext/htsjdk/pgmb.fasta");
-    
+    File fasta = new File("test/jalview/ext/htsjdk/pgmB.fasta");
+
     /*
      * create .fai with no overwrite fails if it exists
      */
-    try {
+    try
+    {
       HtsContigDb.createFastaSequenceIndex(fasta.toPath(), false);
       fail("Expected exception");
     } catch (IOException e)
     {
+      System.out.println(
+              "Caught IOException in testCreateFastaSequenceIndex");
+      e.printStackTrace();
       // expected
     }
 
index f5e637c..bcad464 100644 (file)
@@ -62,9 +62,9 @@ public class JmolParserTest
    * 1GAQ has been reduced to alpha carbons only
    * 1QCF is the full PDB file including headers, HETATM etc
    */
-  String[] testFile = new String[] { "./examples/1GAQ.txt",
+  String[] testFile = new String[] { "./examples/1gaq.txt",
       "./test/jalview/ext/jmol/1xyz.pdb",
-      "./test/jalview/ext/jmol/1qcf.pdb" };
+      "./test/jalview/ext/jmol/1QCF.pdb" };
 
   //@formatter:off
   // a modified and very cut-down extract of 4UJ4
@@ -130,17 +130,17 @@ public class JmolParserTest
       JmolParser jtest = new JmolParser(pdbStr, DataSourceType.FILE);
       Vector<SequenceI> seqs = jtest.getSeqs(), mcseqs = mctest.getSeqs();
 
-      assertTrue(
-              "No sequences extracted from testfile\n"
-                      + (jtest.hasWarningMessage() ? jtest.getWarningMessage()
-                              : "(No warnings raised)"), seqs != null
-                      && seqs.size() > 0);
+      assertTrue("No sequences extracted from testfile\n"
+              + (jtest.hasWarningMessage() ? jtest.getWarningMessage()
+                      : "(No warnings raised)"),
+              seqs != null && seqs.size() > 0);
       for (SequenceI sq : seqs)
       {
-        assertEquals("JMol didn't process " + pdbStr
-                + " to the same sequence as MCView",
-                sq.getSequenceAsString(), mcseqs.remove(0)
-                        .getSequenceAsString());
+        assertEquals(
+                "JMol didn't process " + pdbStr
+                        + " to the same sequence as MCView",
+                sq.getSequenceAsString(),
+                mcseqs.remove(0).getSequenceAsString());
         AlignmentI al = new Alignment(new SequenceI[] { sq });
         validateSecStrRows(al);
       }
@@ -175,13 +175,15 @@ public class JmolParserTest
 
   private void checkFirstAAIsAssoc(SequenceI sq)
   {
-    assertTrue("No secondary structure assigned for protein sequence for "
-            + sq.getName(),
+    assertTrue(
+            "No secondary structure assigned for protein sequence for "
+                    + sq.getName(),
             sq.getAnnotation() != null && sq.getAnnotation().length >= 1
                     && sq.getAnnotation()[0].hasIcons);
     assertTrue(
             "Secondary structure not associated for sequence "
-                    + sq.getName(), sq.getAnnotation()[0].sequenceRef == sq);
+                    + sq.getName(),
+            sq.getAnnotation()[0].sequenceRef == sq);
   }
 
   /**
@@ -194,7 +196,8 @@ public class JmolParserTest
   {
     PDBfile mctest = new PDBfile(false, false, false,
             pastePDBDataWithChainBreak, DataSourceType.PASTE);
-    JmolParser jtest = new JmolParser(pastePDBDataWithChainBreak, DataSourceType.PASTE);
+    JmolParser jtest = new JmolParser(pastePDBDataWithChainBreak,
+            DataSourceType.PASTE);
     Vector<SequenceI> seqs = jtest.getSeqs();
     Vector<SequenceI> mcseqs = mctest.getSeqs();
 
@@ -216,8 +219,7 @@ public class JmolParserTest
   {
     PDBfile mctest = new PDBfile(false, false, false, pdbWithAltLoc,
             DataSourceType.PASTE);
-    JmolParser jtest = new JmolParser(pdbWithAltLoc,
-            DataSourceType.PASTE);
+    JmolParser jtest = new JmolParser(pdbWithAltLoc, DataSourceType.PASTE);
     Vector<SequenceI> seqs = jtest.getSeqs();
     Vector<SequenceI> mcseqs = mctest.getSeqs();