2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
3 * Copyright (C) 2016 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 = { "network" })
31 public void testRfamFullAndSeed() throws Exception
33 RfamFull rff = new RfamFull();
34 RfamSeed rfseed = new RfamSeed();
36 AlignmentI fullrf = rff.getSequenceRecords(rff.getTestQuery());
37 Assert.assertNotNull(fullrf, "Full Alignment for " + rff.getTestQuery()
38 + " didn't retrieve.");
39 Assert.assertTrue(fullrf.getHeight() > 1,
40 "Full Alignment for " + rff.getTestQuery()
41 + " didn't have more than one sequence.");
42 AlignmentI seedrf = rfseed.getSequenceRecords(rff.getTestQuery());
43 Assert.assertNotNull(seedrf, "Seed Alignment for " + rff.getTestQuery()
44 + " didn't retrieve.");
46 Assert.assertTrue(seedrf.getHeight() < fullrf.getHeight(),
47 "Expected Full alignment to have more sequences than seed for "
48 + rff.getTestQuery());
51 @Test(groups = { "network" })
52 public void testPfamFullAndSeed() throws Exception
54 PfamFull pff = new PfamFull();
55 PfamSeed pfseed = new PfamSeed();
57 AlignmentI fullpf = pff.getSequenceRecords(pff.getTestQuery());
58 Assert.assertNotNull(fullpf, "Full Alignment for " + pff.getTestQuery()
59 + " didn't retrieve.");
60 Assert.assertTrue(fullpf.getHeight() > 1,
61 "Full Alignment for " + pff.getTestQuery()
62 + " didn't have more than one sequence.");
63 AlignmentI seedpf = pfseed.getSequenceRecords(pff.getTestQuery());
64 Assert.assertNotNull(seedpf, "Seed Alignment for " + pff.getTestQuery()
65 + " didn't retrieve.");
67 Assert.assertTrue(seedpf.getHeight() < fullpf.getHeight(),
68 "Expected Full alignment to have more sequences than seed for "
69 + pff.getTestQuery());