JAL-1270 JUnit to TestNG refactoring
[jalview.git] / test / jalview / util / MappingUtilsTest.java
index 4e144fc..1bbdc1e 100644 (file)
@@ -1,9 +1,9 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.awt.Color;
 import java.io.IOException;
 import java.util.Arrays;
@@ -12,8 +12,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.junit.Test;
-
 import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
@@ -90,7 +88,7 @@ public class MappingUtilsTest
    * Simple test of mapping with introns involved.
    */
   @Test
-  public void testBuildSearchResults_withIntro()
+  public void testBuildSearchResults_withIntron()
   {
     final Sequence seq1 = new Sequence("Seq1", "C-G-TAGA-GCAGCTT");
     seq1.createDatasetSequence();
@@ -384,6 +382,15 @@ public class MappingUtilsTest
     assertEquals("[0, 1, 3]", cs.getSelected().toString());
   }
 
+  @Test
+  public void testMapColumnSelection_null() throws IOException
+  {
+    setupMappedAlignments();
+    ColumnSelection cs = MappingUtils.mapColumnSelection(null, dnaView,
+            proteinView);
+    assertTrue("mapped selection not empty", cs.getSelected().isEmpty());
+  }
+
   /**
    * Tests for the method that converts a series of [start, end] ranges to
    * single positions