JAL-4371 minimal test and move PDBEntryUtils to correct package
authorJames Procter <j.procter@dundee.ac.uk>
Tue, 23 Jan 2024 14:41:59 +0000 (14:41 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Tue, 23 Jan 2024 14:41:59 +0000 (14:41 +0000)
src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java
src/jalview/structure/PDBEntryUtils.java [moved from src/jalview/struture/PDBEntryUtils.java with 99% similarity]
src/jalview/structure/StructureSelectionManager.java
test/jalview/structure/PDBEntryUtilsTest.java [new file with mode: 0644]

index bd9a2ab..4d9d096 100644 (file)
@@ -45,7 +45,7 @@ import jalview.fts.core.FTSRestRequest;
 import jalview.fts.core.FTSRestResponse;
 import jalview.fts.service.pdb.PDBFTSRestClient;
 import jalview.jbgui.FilterOption;
-import jalview.struture.PDBEntryUtils;
+import jalview.structure.PDBEntryUtils;
 import jalview.util.MessageManager;
 
 /**
similarity index 99%
rename from src/jalview/struture/PDBEntryUtils.java
rename to src/jalview/structure/PDBEntryUtils.java
index 131030c..a1d9bce 100644 (file)
@@ -18,7 +18,7 @@
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-package jalview.struture;
+package jalview.structure;
 
 import java.util.ArrayList;
 import java.util.HashSet;
index a804d84..0f82650 100644 (file)
@@ -56,7 +56,6 @@ import jalview.io.AppletFormatAdapter;
 import jalview.io.DataSourceType;
 import jalview.io.StructureFile;
 import jalview.structure.StructureImportSettings.TFType;
-import jalview.struture.PDBEntryUtils;
 import jalview.util.MapList;
 import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
diff --git a/test/jalview/structure/PDBEntryUtilsTest.java b/test/jalview/structure/PDBEntryUtilsTest.java
new file mode 100644 (file)
index 0000000..9b14b7c
--- /dev/null
@@ -0,0 +1,26 @@
+package jalview.structure;
+
+import static org.testng.Assert.assertEquals;
+
+import java.util.List;
+
+import org.testng.annotations.Test;
+
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.Sequence;
+
+public class PDBEntryUtilsTest
+{
+
+  @Test(groups= {"Functional"})
+  public void testinferPDBEntry() {
+    List<PDBEntry> expected;
+    expected = PDBEntryUtils.inferPDBEntry(new Sequence("1sqy_A.pdb",""));
+    assertEquals(expected.size(),1);
+    PDBEntry exp = expected.get(0);
+    assertEquals(exp.getId(),"1sqy");
+    assertEquals(exp.getChainCode(), "A");
+    
+    
+  }
+}