Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git] / test / jalview / fts / threedbeacons / TDBeaconsPanelTest.java
diff --git a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java
new file mode 100644 (file)
index 0000000..dec33e3
--- /dev/null
@@ -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);
+//  }
+}