import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
+import jalview.gui.JvOptionPane;
+
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/*
*/
public class SparseIntArrayTest
{
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
@Test(groups = "Functional")
public void testPut()
{
public void testAdd()
{
SparseIntArray counter = new SparseIntArray();
-
+
assertEquals(counter.add('P', 2), 2);
assertEquals(counter.add('P', 3), 5);
counter.put('Q', 7);
{
// expected
}
-
+
counter.put('y', Integer.MIN_VALUE);
try
{