@Test(groups = { "Functional" })
public void fetchStructuresInfoMockedTest()
{
- Assert.fail("Not yet implemented");
TDBeaconsFTSRestClientTest.setMock();
-
- // PDBFTSRestClient.setMock();
+ PDBFTSRestClient.setMock();
SequenceI[] selectedSeqs = new SequenceI[] { upSeq };
StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
sc.fetchStructuresMetaData();
import jalview.fts.service.pdb.PDBFTSRestClient;
import jalview.fts.threedbeacons.TDBeaconsFTSRestClientTest;
import jalview.gui.JvOptionPane;
+import jalview.gui.StructureChooser;
import jalview.jbgui.FilterOption;
public class StructureChooserQuerySourceTest
FTSRestResponse upResponse = null;
FTSRestResponse pdbResponse = null;
-
+ // TODO test available options
+ // Best coverage
+ // Best Alphafold Model
+ // Best model (by confidence score)
+ // Will also need to develop a more sophisticated filtering system
+ FilterOption opt = tdbquery.getAvailableFilterOptions(StructureChooser.VIEWS_FILTER).get(0);
try {
- upResponse = tdbquery.fetchStructuresMetaData(upSeq, tdbquery.getDocFieldPrefs().getStructureSummaryFields(), null, false);
+ upResponse = tdbquery.fetchStructuresMetaData(upSeq, tdbquery.getDocFieldPrefs().getStructureSummaryFields(), opt, false);
// test ranking without additional PDBe data
- FTSRestResponse firstRanked = tdbquery.selectFirstRankedQuery(upSeq, upResponse.getSearchSummary(), tdbquery.getDocFieldPrefs().getStructureSummaryFields(), "", false);
+ FTSRestResponse firstRanked = tdbquery.selectFirstRankedQuery(upSeq, upResponse.getSearchSummary(), tdbquery.getDocFieldPrefs().getStructureSummaryFields(), opt.getValue(), false);
assertTrue(firstRanked.getNumberOfItemsFound()<upResponse.getNumberOfItemsFound());
// NB Could have race condition here
String pdb_Query = tdbquery.buildPDBFTSQueryFor(upResponse);