From 4bc5c1c97bd08007b2ac9ccfd9b3cb29eac10193 Mon Sep 17 00:00:00 2001 From: James Procter Date: Tue, 23 Jan 2024 14:41:59 +0000 Subject: [PATCH] JAL-4371 minimal test and move PDBEntryUtils to correct package --- .../PDBStructureChooserQuerySource.java | 2 +- .../{struture => structure}/PDBEntryUtils.java | 2 +- .../structure/StructureSelectionManager.java | 1 - test/jalview/structure/PDBEntryUtilsTest.java | 26 ++++++++++++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) rename src/jalview/{struture => structure}/PDBEntryUtils.java (99%) create mode 100644 test/jalview/structure/PDBEntryUtilsTest.java diff --git a/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java b/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java index bd9a2ab..4d9d096 100644 --- a/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java +++ b/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java @@ -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; /** diff --git a/src/jalview/struture/PDBEntryUtils.java b/src/jalview/structure/PDBEntryUtils.java similarity index 99% rename from src/jalview/struture/PDBEntryUtils.java rename to src/jalview/structure/PDBEntryUtils.java index 131030c..a1d9bce 100644 --- a/src/jalview/struture/PDBEntryUtils.java +++ b/src/jalview/structure/PDBEntryUtils.java @@ -18,7 +18,7 @@ * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ -package jalview.struture; +package jalview.structure; import java.util.ArrayList; import java.util.HashSet; diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index a804d84..0f82650 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -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 index 0000000..9b14b7c --- /dev/null +++ b/test/jalview/structure/PDBEntryUtilsTest.java @@ -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 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"); + + + } +} -- 1.7.10.2