JAL-2885 uniprot now https, uniprot/ensembl/pfam/xfam configurable
[jalview.git] / test / jalview / ws / dbsources / PfamFullTest.java
1 package jalview.ws.dbsources;
2
3 import static org.testng.Assert.assertEquals;
4
5 import jalview.bin.Cache;
6
7 import org.testng.annotations.BeforeClass;
8 import org.testng.annotations.Test;
9
10 public class PfamFullTest
11 {
12   @BeforeClass(alwaysRun = true)
13   public void setUp()
14   {
15     Cache.loadProperties("test/jalview/io/testProps.jvprops");
16   }
17
18   @Test(groups = "Functional")
19   public void testGetURL()
20   {
21     // with default value for domain
22     String url = new PfamFull().getURL(" abc ");
23     assertEquals(url, "http://pfam.xfam.org/family/ABC/alignment/full");
24
25     // with override in properties
26     Cache.setProperty("PFAM_DOMAIN", "https://pfam.xfam.org");
27     url = new PfamFull().getURL(" abc ");
28     assertEquals(url, "https://pfam.xfam.org/family/ABC/alignment/full");
29   }
30 }