JAL-1805 test envirionment separation
[jalview.git] / test / jalview / util / DBRefUtilsTest.java
index e606665..b06132b 100644 (file)
@@ -1,12 +1,10 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertNull;
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
@@ -15,6 +13,8 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
+import org.testng.annotations.Test;
+
 public class DBRefUtilsTest
 {
 
@@ -22,7 +22,7 @@ public class DBRefUtilsTest
    * Test the method that selects DBRefEntry items whose source is in a supplied
    * list
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSelectRefs()
   {
     assertNull(DBRefUtils.selectRefs(null, null));
@@ -66,7 +66,7 @@ public class DBRefUtilsTest
    * Test the method that converts (currently three) database names to a
    * canonical name (not case-sensitive)
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testGetCanonicalName()
   {
     assertNull(DBRefUtils.getCanonicalName(null));
@@ -83,7 +83,7 @@ public class DBRefUtilsTest
             DBRefUtils.getCanonicalName("UNIPROTKB/SWISS-CHEESE"));
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testIsDasCoordinateSystem()
   {
     assertFalse(DBRefUtils.isDasCoordinateSystem(null, null));
@@ -118,7 +118,7 @@ public class DBRefUtilsTest
   /**
    * Test 'parsing' a DBRef - non PDB case
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testParseToDbRef()
   {
     SequenceI seq = new Sequence("Seq1", "ABCD");
@@ -135,7 +135,7 @@ public class DBRefUtilsTest
   /**
    * Test 'parsing' a DBRef - Stockholm PDB format
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testParseToDbRef_PDB()
   {
     SequenceI seq = new Sequence("Seq1", "ABCD");
@@ -152,15 +152,15 @@ public class DBRefUtilsTest
     PDBEntry pdbRef = seq.getPDBId().get(0);
     assertEquals("1WRI", pdbRef.getId());
     assertNull(pdbRef.getFile());
-    assertEquals("A", pdbRef.getProperty().get("CHAIN"));
-    assertNull(pdbRef.getType());
+    assertEquals("A", pdbRef.getChainCode());
+    assertEquals("PDB", pdbRef.getType());
   }
 
   /**
    * Test the method that searches for matches references - case when we are
    * matching a reference with no mappings
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSearchRefs_noMapping()
   {
     DBRefEntry target = new DBRefEntry("EMBL", "2", "A1234");
@@ -189,7 +189,7 @@ public class DBRefUtilsTest
    * Test the method that searches for matches references - case when we are
    * matching a reference with a mapping
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSearchRefs_withMapping()
   {
     DBRefEntry target = new DBRefEntry("EMBL", "2", "A1234");