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;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
+import org.testng.annotations.Test;
+
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));
* 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));
DBRefUtils.getCanonicalName("UNIPROTKB/SWISS-CHEESE"));
}
- @Test
+ @Test(groups ={ "Functional" })
public void testIsDasCoordinateSystem()
{
assertFalse(DBRefUtils.isDasCoordinateSystem(null, null));
/**
* Test 'parsing' a DBRef - non PDB case
*/
- @Test
+ @Test(groups ={ "Functional" })
public void testParseToDbRef()
{
SequenceI seq = new Sequence("Seq1", "ABCD");
/**
* Test 'parsing' a DBRef - Stockholm PDB format
*/
- @Test
+ @Test(groups ={ "Functional" })
public void testParseToDbRef_PDB()
{
SequenceI seq = new Sequence("Seq1", "ABCD");
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");
* 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");