package MCview; import static org.testng.AssertJUnit.assertNull; import static org.testng.AssertJUnit.assertSame; import java.util.Vector; import org.testng.annotations.Test; public class ResidueTest { @Test(groups ={ "Functional" }) public void testFindAtom() { Atom a1 = new Atom(1f, 2f, 3f); a1.name = "C"; Atom a2 = new Atom(1f, 2f, 3f); a2.name = "A"; Atom a3 = new Atom(1f, 2f, 3f); a3.name = "P"; Atom a4 = new Atom(1f, 2f, 3f); a4.name = "C"; Vector v = new Vector(); v.add(a1); v.add(a2); v.add(a3); v.add(a4); Residue r = new Residue(v, 293, 12); assertSame(a1, r.findAtom("C")); assertSame(a2, r.findAtom("A")); assertSame(a3, r.findAtom("P")); assertNull(r.findAtom("S")); } }