import java.awt.event.InputEvent;
import java.awt.event.MouseEvent;
+import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
assertEquals(Platform.escapeBackslashes("hello world"), "hello world");
assertEquals(Platform.escapeBackslashes("hello\\world"), "hello\\\\world");
}
+
+ @Test(groups = { "Functional" })
+ public void getLeadingIntegerFromString()
+ {
+ Assert.assertEquals(Platform.getLeadingIntegerValue("1234abcd", -1),
+ 1234);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("1234", -1), 1234);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("abcd", -1), -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("abcd1234", -1),
+ -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("None", -1), -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("Null", -1), -1);
+ }
}
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
-import jalview.api.DBRefEntryI;
-import jalview.bin.Cache;
-import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.DBRefSource;
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceI;
-import jalview.gui.JvOptionPane;
-import jalview.io.DataSourceType;
-import jalview.structure.StructureMapping;
-import jalview.util.Platform;
-import jalview.xml.binding.sifts.Entry.Entity;
-
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
+import jalview.api.DBRefEntryI;
+import jalview.bin.Cache;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.gui.JvOptionPane;
+import jalview.io.DataSourceType;
+import jalview.structure.StructureMapping;
+import jalview.xml.binding.sifts.Entry.Entity;
import mc_view.Atom;
import mc_view.PDBfile;
atom.atomIndex = 7;
atoms.add(atom);
int actualAtomIndex = siftsClient.getAtomIndex(1, atoms);
- Assert.assertEquals(actualAtomIndex, siftsClient.UNASSIGNED);
+ Assert.assertEquals(actualAtomIndex, SiftsClient.UNASSIGNED);
actualAtomIndex = siftsClient.getAtomIndex(43, atoms);
Assert.assertEquals(actualAtomIndex, 7);
}
Assert.assertNull(entityP);
}
-
- @Test(groups = { "Network" })
- public void getLeadingIntegerFromString()
- {
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("1234abcd", -1), 1234);
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("1234", -1),
- 1234);
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("abcd", -1), -1);
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("abcd1234", -1), -1);
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("None", -1), -1);
- Assert.assertEquals(
- Platform.getLeadingIntegerValue("Null", -1), -1);
- }
}