X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fdbsources%2FPfamSeedTest.java;fp=test%2Fjalview%2Fws%2Fdbsources%2FPfamSeedTest.java;h=537c97ed735e0128d4bcce0e8ff91aa0dca06a49;hb=d7e95f458ebcbbdcc13f8b07357542ab2d7e4547;hp=0000000000000000000000000000000000000000;hpb=5363c7b5990f49e763d99f927a206e4ec6eea774;p=jalview.git diff --git a/test/jalview/ws/dbsources/PfamSeedTest.java b/test/jalview/ws/dbsources/PfamSeedTest.java new file mode 100644 index 0000000..537c97e --- /dev/null +++ b/test/jalview/ws/dbsources/PfamSeedTest.java @@ -0,0 +1,30 @@ +package jalview.ws.dbsources; + +import static org.testng.Assert.assertEquals; + +import jalview.bin.Cache; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +public class PfamSeedTest +{ + @BeforeClass(alwaysRun = true) + public void setUp() + { + Cache.loadProperties("test/jalview/io/testProps.jvprops"); + } + + @Test(groups = "Functional") + public void testGetURL() + { + // with default value for domain + String url = new PfamSeed().getURL(" abc "); + assertEquals(url, "http://pfam.xfam.org/family/ABC/alignment/seed"); + + // with override in properties + Cache.setProperty("PFAM_DOMAIN", "https://pfam.xfam.org"); + url = new PfamSeed().getURL(" abc "); + assertEquals(url, "https://pfam.xfam.org/family/ABC/alignment/seed"); + } +}