*/
abstract public class Pfam extends Xfam
{
- private static final String PFAM_BASEURL_KEY = "PFAM_BASEURL";
+ static final String PFAM_BASEURL_KEY = "PFAM_BASEURL";
private static final String DEFAULT_PFAM_BASEURL = "https://pfam.xfam.org";
*/
abstract public class Rfam extends Xfam
{
- private static final String RFAM_BASEURL_KEY = "RFAM_BASEURL";
+ static final String RFAM_BASEURL_KEY = "RFAM_BASEURL";
private static final String DEFAULT_RFAM_BASEURL = "https://rfam.xfam.org";
@Test(groups = "Functional")
public void testGetURL()
{
+ String path = "pfam.xfam.org/family/ABC/alignment/full";
+
// with default value for domain
String url = new PfamFull().getURL(" abc ");
- assertEquals(url, "http://pfam.xfam.org/family/ABC/alignment/full");
+ assertEquals(url, "https://" + path);
// with override in properties
- Cache.setProperty("PFAM_DOMAIN", "https://pfam.xfam.org");
+ Cache.setProperty(Pfam.PFAM_BASEURL_KEY, "http://pfam.xfam.org");
url = new PfamFull().getURL(" abc ");
- assertEquals(url, "https://pfam.xfam.org/family/ABC/alignment/full");
+ assertEquals(url, "http://" + path);
}
}
@Test(groups = "Functional")
public void testGetURL()
{
+ String path = "pfam.xfam.org/family/ABC/alignment/seed";
+
// with default value for domain
String url = new PfamSeed().getURL(" abc ");
- assertEquals(url, "http://pfam.xfam.org/family/ABC/alignment/seed");
+ assertEquals(url, "https://" + path);
// with override in properties
- Cache.setProperty("PFAM_DOMAIN", "https://pfam.xfam.org");
+ Cache.setProperty(Pfam.PFAM_BASEURL_KEY, "http://pfam.xfam.org");
url = new PfamSeed().getURL(" abc ");
- assertEquals(url, "https://pfam.xfam.org/family/ABC/alignment/seed");
+ assertEquals(url, "http://" + path);
}
}
@Test(groups = "Functional")
public void testGetURL()
{
+ String path = "rfam.xfam.org/family/ABC/alignment/full";
+
// with default value for domain
String url = new RfamFull().getURL(" abc ");
- assertEquals(url, "http://rfam.xfam.org/family/ABC/alignment/full");
+ assertEquals(url, "https://" + path);
// with override in properties
- Cache.setProperty("RFAM_DOMAIN", "https://rfam.xfam.org");
+ Cache.setProperty(Rfam.RFAM_BASEURL_KEY, "http://rfam.xfam.org");
url = new RfamFull().getURL(" abc ");
- assertEquals(url, "https://rfam.xfam.org/family/ABC/alignment/full");
+ assertEquals(url, "http://" + path);
}
}
@Test(groups = "Functional")
public void testGetURL()
{
+ String path = "rfam.xfam.org/family/ABC/alignment/stockholm";
+
// with default value for domain
String url = new RfamSeed().getURL(" abc ");
- assertEquals(url,
- "http://rfam.xfam.org/family/ABC/alignment/stockholm");
+ assertEquals(url, "https://" + path);
// with override in properties
- Cache.setProperty("RFAM_DOMAIN", "https://rfam.xfam.org");
+ Cache.setProperty(Rfam.RFAM_BASEURL_KEY, "http://rfam.xfam.org");
url = new RfamSeed().getURL(" abc ");
- assertEquals(url,
- "https://rfam.xfam.org/family/ABC/alignment/stockholm");
+ assertEquals(url, "http://" + path);
}
}