3 import org.testng.Assert;
4 import org.testng.annotations.DataProvider;
5 import org.testng.annotations.Test;
7 public class IdentifyFileTest
10 @Test(groups = { "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()
23 return new Object[][] {
24 { "examples/example.json", "JSON" },
25 { "examples/plantfdx.fa", "FASTA" },
26 { "examples/dna_interleaved.phy", "PHYLIP" },
27 { "examples/2GIS.pdb", "PDB" },
28 { "examples/rf00031_folded.stk", "STH" },
29 { "examples/testdata/test.rnaml", "RNAML" },
30 { "examples/testdata/test.aln", "CLUSTAL" },
31 { "examples/testdata/test.pfam", "PFAM" },
32 { "examples/testdata/test.msf", "MSF" },
33 { "examples/testdata/test.pir", "PIR" },
34 { "examples/testdata/test.html", "HTML" },
35 { "examples/testdata/test.pileup", "PileUp" },
36 { "examples/testdata/test.blc", "BLC" },
37 { "examples/testdata/simplegff3.gff", "GFF v2 or v3" },
38 { "examples/testdata/test.jvp", "Jalview" },
40 "examples/testdata/cullpdb_pc25_res3.0_R0.3_d150729_chains9361.fasta.15316",
43 // { "examples/testdata/test.amsa", "AMSA" },
44 // { "examples/test.jnet", "JnetFile" },