X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fseqfetcher%2FDbRefFetcherTest.java;h=8ba25859c842974b975b376f7c1a365fd3f1dcf1;hb=046aff3885029c55f22027c6fdbeba8167a3a733;hp=6769d39d0f597fa131967b8be71aa3423603e207;hpb=fbfbbe26bee37143d5279fe4d254a5a89c96b021;p=jalview.git diff --git a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java index 6769d39..8ba2585 100644 --- a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java +++ b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java @@ -20,12 +20,20 @@ */ package jalview.ws.seqfetcher; -import static org.testng.Assert.assertNotEquals; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + import jalview.analysis.CrossRef; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; @@ -43,15 +51,6 @@ import jalview.ws.dbsources.EBIAlfaFold; import jalview.ws.dbsources.Pdb; import jalview.ws.dbsources.Uniprot; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.junit.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - /** * @author jimp * @@ -240,18 +239,21 @@ public class DbRefFetcherTest public void testAlphaFoldClien() throws Exception { DbSourceProxy alphafold = new EBIAlfaFold(); - AlignmentI resp = alphafold.getSequenceRecords(alphafold.getTestQuery()); + AlignmentI resp = alphafold + .getSequenceRecords(alphafold.getTestQuery()); assertNotNull(resp); - assertEquals("One sequence only",resp.getHeight(), 1); - for (AlignmentAnnotation aa:resp.getAlignmentAnnotation()) { - if (aa.graph == AlignmentAnnotation.CUSTOMRENDERER) + assertEquals("One sequence only", resp.getHeight(), 1); + for (AlignmentAnnotation aa : resp.getAlignmentAnnotation()) + { + if (aa.graph == AlignmentAnnotation.CONTACT_MAP) { - assertTrue("Contact map didn't provide valid contact",resp.getContactListFor(aa, 1).getContactAt(1)!=-1d); + assertTrue("Contact map didn't provide valid contact", + resp.getContactListFor(aa, 1).getContactAt(1) != -1d); // test passes return; } } - Assert.fail(); + Assert.fail("No pAE matrix found for alphafold structure."); } }