JAL-2071 architectural improvement for Plugable Free Text Search Services
[jalview.git] / test / jalview / fts / service / pdb / PDBFTSPanelTest.java
similarity index 85%
rename from test/jalview/gui/PDBSearchPanelTest.java
rename to test/jalview/fts/service/pdb/PDBFTSPanelTest.java
index 2310373..6837847 100644 (file)
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-package jalview.gui;
+package jalview.fts.service.pdb;
 
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertTrue;
 
+import jalview.fts.service.pdb.PDBFTSPanel;
+
 import javax.swing.JInternalFrame;
 import javax.swing.JTextField;
 
@@ -30,7 +32,7 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-public class PDBSearchPanelTest
+public class PDBFTSPanelTest
 {
 
   @BeforeMethod(alwaysRun = true)
@@ -46,7 +48,7 @@ public class PDBSearchPanelTest
   @Test(groups = { "Functional" })
   public void populateCmbSearchTargetOptionsTest()
   {
-    PDBSearchPanel searchPanel = new PDBSearchPanel(null);
+    PDBFTSPanel searchPanel = new PDBFTSPanel(null);
     assertTrue(searchPanel.getCmbSearchTarget().getItemCount() > 0);
     searchPanel.populateCmbSearchTargetOptions();
   }
@@ -55,13 +57,13 @@ public class PDBSearchPanelTest
   public void testDecodeSearchTerm()
   {
     String expectedString = "1xyz OR text:2xyz OR text:3xyz";
-    String outcome = PDBSearchPanel.decodeSearchTerm("1xyz:A;2xyz;3xyz",
+    String outcome = PDBFTSPanel.decodeSearchTerm("1xyz:A;2xyz;3xyz",
             "text");
     // System.out.println("1 >>>>>>>>>>> " + outcome);
     assertEquals(expectedString, outcome);
 
     expectedString = "1xyz";
-    outcome = PDBSearchPanel.decodeSearchTerm("1xyz", "text");
+    outcome = PDBFTSPanel.decodeSearchTerm("1xyz", "text");
     // System.out.println("2 >>>>>>>>>>> " + outcome);
     assertEquals(expectedString, outcome);
   }
@@ -71,19 +73,19 @@ public class PDBSearchPanelTest
   {
 
     String expectedString = "1xyz:A";
-    String outcome = PDBSearchPanel.getPDBIdwithSpecifiedChain("1xyz",
+    String outcome = PDBFTSPanel.getPDBIdwithSpecifiedChain("1xyz",
             "2xyz;3xyz;1xyz:A");
     System.out.println("1 >>>>>>>>>>> " + outcome);
     assertEquals(expectedString, outcome);
 
     expectedString = "2xyz";
-    outcome = PDBSearchPanel.getPDBIdwithSpecifiedChain("2xyz",
+    outcome = PDBFTSPanel.getPDBIdwithSpecifiedChain("2xyz",
             "1xyz:A;2xyz;3xyz");
     System.out.println("2 >>>>>>>>>>> " + outcome);
     assertEquals(expectedString, outcome);
 
     expectedString = "2xyz:A";
-    outcome = PDBSearchPanel.getPDBIdwithSpecifiedChain("2xyz", "2xyz:A");
+    outcome = PDBFTSPanel.getPDBIdwithSpecifiedChain("2xyz", "2xyz:A");
     System.out.println("3 >>>>>>>>>>> " + outcome);
     assertEquals(expectedString, outcome);
   }
@@ -91,7 +93,7 @@ public class PDBSearchPanelTest
   @Test(groups = { "Network", "External" }, timeOut = 7000)
   public void txt_search_ActionPerformedTest()
   {
-    PDBSearchPanel searchPanel = new PDBSearchPanel(null);
+    PDBFTSPanel searchPanel = new PDBFTSPanel(null);
     JInternalFrame mainFrame = searchPanel.getMainFrame();
     JTextField txt_search = searchPanel.getTxtSearch();