Updated with latest from mchmmer branch
[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     String path = "pfam.xfam.org/family/ABC/alignment/full";
22
23     // with default value for domain
24     String url = new PfamFull().getURL(" abc ");
25     assertEquals(url, "https://" + path);
26
27     // with override in properties
28     Cache.setProperty(Pfam.PFAM_BASEURL_KEY, "http://pfam.xfam.org");
29     url = new PfamFull().getURL(" abc ");
30     assertEquals(url, "http://" + path);
31   }
32 }