2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.ws.dbsources;
23 import jalview.datamodel.AlignmentI;
25 import org.testng.Assert;
26 import org.testng.annotations.Test;
28 public class XfamFetcherTest
30 @Test(groups = { "External" })
31 public void testRfamSeed() throws Exception
33 // RfamFull rff = new RfamFull();
34 RfamSeed rfs = new RfamSeed();
36 AlignmentI seedrf = rfs.getSequenceRecords(rfs.getTestQuery());
37 Assert.assertNotNull(seedrf, "Seed Alignment for " + rfs.getTestQuery()
38 + " didn't retrieve.");
39 Assert.assertTrue(seedrf.getHeight() > 1,
40 "Seed Alignment for " + rfs.getTestQuery()
41 + " didn't contain more than one sequence.");
44 @Test(groups = { "External" })
45 public void testPfamFullAndSeed() throws Exception
47 PfamFull pff = new PfamFull();
48 PfamSeed pfseed = new PfamSeed();
50 AlignmentI fullpf = pff.getSequenceRecords(pff.getTestQuery());
51 Assert.assertNotNull(fullpf, "Full Alignment for " + pff.getTestQuery()
52 + " didn't retrieve.");
53 Assert.assertTrue(fullpf.getHeight() > 1,
54 "Full Alignment for " + pff.getTestQuery()
55 + " didn't have more than one sequence.");
56 AlignmentI seedpf = pfseed.getSequenceRecords(pff.getTestQuery());
57 Assert.assertNotNull(seedpf, "Seed Alignment for " + pff.getTestQuery()
58 + " didn't retrieve.");
60 Assert.assertTrue(seedpf.getHeight() < fullpf.getHeight(),
61 "Expected Full alignment to have more sequences than seed for "
62 + pff.getTestQuery());