From 556647d95b0a68273fce9ade5ff97f1de9292b2c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 3 Jun 2022 14:13:41 +0100 Subject: [PATCH] JAL-4021 todo & fix FileFormat tests --- src/jalview/ext/forester/io/PhyloXmlFile.java | 2 +- src/jalview/io/FileFormat.java | 3 ++- test/jalview/io/FileFormatsTest.java | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/jalview/ext/forester/io/PhyloXmlFile.java b/src/jalview/ext/forester/io/PhyloXmlFile.java index 3cb3223..3d04fe5 100644 --- a/src/jalview/ext/forester/io/PhyloXmlFile.java +++ b/src/jalview/ext/forester/io/PhyloXmlFile.java @@ -21,7 +21,7 @@ public class PhyloXmlFile extends AlignFile @Override public String print(SequenceI[] seqs, boolean jvsuffix) { - // TODO Auto-generated method stub + // TODO JAL-4021 - not yet implemented return null; } diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index 361d699..889ab1b 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -437,7 +437,7 @@ public enum FileFormat implements FileFormatI // } // // }, - PhyloXML("PhyloXML", "phyloxml,phylo.xml,pxml", true, true) + PhyloXML("PhyloXML", "phyloxml,phylo.xml,pxml", true, false) { @Override @@ -450,6 +450,7 @@ public enum FileFormat implements FileFormatI @Override public AlignmentFileWriterI getWriter(AlignmentI al) { + // TODO: JAL-4021 // handle within Aptx? return null; } diff --git a/test/jalview/io/FileFormatsTest.java b/test/jalview/io/FileFormatsTest.java index 27cfa5e..3d2c316 100644 --- a/test/jalview/io/FileFormatsTest.java +++ b/test/jalview/io/FileFormatsTest.java @@ -78,7 +78,7 @@ public class FileFormatsTest @Test(groups = "Functional") public void testGetReadableFormats() { - String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview]"; + String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, PhyloXML]"; FileFormats formats = FileFormats.getInstance(); assertEquals(formats.getReadableFormats().toString(), expected); } @@ -97,14 +97,14 @@ public class FileFormatsTest public void testDeregisterFileFormat() { String writable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP]"; - String readable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview]"; + String readable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, PhyloXML]"; FileFormats formats = FileFormats.getInstance(); assertEquals(formats.getWritableFormats(true).toString(), writable); assertEquals(formats.getReadableFormats().toString(), readable); formats.deregisterFileFormat(FileFormat.Fasta.getName()); writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP]"; - readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview]"; + readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, PhyloXML]"; assertEquals(formats.getWritableFormats(true).toString(), writable); assertEquals(formats.getReadableFormats().toString(), readable); @@ -113,7 +113,7 @@ public class FileFormatsTest */ formats.registerFileFormat(FileFormat.Fasta); writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, Fasta]"; - readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, Fasta]"; + readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, PhyloXML, Fasta]"; assertEquals(formats.getWritableFormats(true).toString(), writable); assertEquals(formats.getReadableFormats().toString(), readable); } -- 1.7.10.2