3 import org.testng.Assert;
4 import org.testng.annotations.DataProvider;
5 import org.testng.annotations.Test;
7 public class IdentifyFileTest {
10 { "Functional" }, dataProvider = "identifyFiles")
11 public void Identify(String data, String expectedFileType)
13 String protocol = AppletFormatAdapter.FILE;
14 IdentifyFile ider = new IdentifyFile();
15 String actualFiletype = ider.Identify(data, protocol);
16 Assert.assertEquals(actualFiletype, expectedFileType,
17 "File identification Failed!");
20 @DataProvider(name = "identifyFiles")
21 public Object[][] IdentifyFileDP()
25 { "examples/example.json", "JSON" },
26 { "examples/plantfdx.fa", "FASTA" },
27 { "examples/dna_interleaved.phy", "PHYLIP" },
28 { "examples/2GIS.pdb", "PDB" },
29 { "examples/rf00031_folded.stk", "STH" },
30 { "examples/testdata/test.rnaml", "RNAML" },
31 { "examples/testdata/test.aln", "CLUSTAL" },
32 { "examples/testdata/test.pfam", "PFAM" },
33 { "examples/testdata/test.msf", "MSF" },
34 { "examples/testdata/test.pir", "PIR" },
35 { "examples/testdata/test.html", "HTML" },
36 { "examples/testdata/test.pileup", "PileUp" },
37 { "examples/testdata/test.blc", "BLC" },
38 { "examples/testdata/simplegff3.gff", "GFF v2 or v3" },
39 { "examples/testdata/test.jvp", "Jalview" },
41 "examples/testdata/cullpdb_pc25_res3.0_R0.3_d150729_chains9361.fasta.15316",
44 // { "examples/testdata/test.amsa", "AMSA" },
45 // { "examples/test.jnet", "JnetFile" },