X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Ffts%2Fthreedbeacons%2FTDBeaconsPanelTest.java;fp=test%2Fjalview%2Ffts%2Fthreedbeacons%2FTDBeaconsPanelTest.java;h=dec33e384d03801a554e1937c080e238d21234c4;hb=304e64fb34b32659be1bbfd39fb4e15b2f79586e;hp=0000000000000000000000000000000000000000;hpb=cfb79b69d9fa44595560659bd95d1d1cd27677ad;p=jalview.git diff --git a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java new file mode 100644 index 0000000..dec33e3 --- /dev/null +++ b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java @@ -0,0 +1,68 @@ +package jalview.fts.threedbeacons; + + +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertTrue; + +import jalview.fts.service.pdb.PDBFTSPanel; +import jalview.fts.service.threedbeacons.TDBeaconsFTSPanel; +import jalview.gui.JvOptionPane; + +import javax.swing.JComboBox; +import javax.swing.JInternalFrame; + +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import junit.extensions.PA; + + +public class TDBeaconsPanelTest +{ + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + @BeforeMethod(alwaysRun = true) + public void setUp() throws Exception + { + } + + @AfterMethod(alwaysRun = true) + public void tearDown() throws Exception + { + } + + @Test(groups = { "Functional" }) + public void populateCmbSearchTargetOptionsTest() + { + TDBeaconsFTSPanel searchPanel = new TDBeaconsFTSPanel(null); + assertTrue(searchPanel.getCmbSearchTarget().getItemCount() > 0); + searchPanel.populateCmbSearchTargetOptions(); + } + + @Test + public void getFTSframeTitleTest() { + TDBeaconsFTSPanel searchPanel = new TDBeaconsFTSPanel(null); + System.out.println(searchPanel.getFTSFrameTitle()); + } + + @Test + public void testgetUNIPROTid() { + String outcome = TDBeaconsFTSPanel.decodeSearchTerm("P01308"); + System.out.println(outcome); + } +// +// @Test +// public void queryTest() { +// int outcome = TDBeaconsFTSPanel.executeParse("P01308"); +// //System.out.println("query outcome :" + outcome); +// int expected_length = 110; +// assertEquals(outcome, expected_length); +// } +}