Skip to content

Commit

Permalink
Atom of copied molecule returns correct index. Closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Apodaca committed Jun 13, 2009
1 parent a00365b commit cf3e28b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/com/metamolecular/mx/test/MoleculeTest.java
Expand Up @@ -292,6 +292,16 @@ public void testCopiedMethaneGivesAtomWithCorrectIndex()

assertEquals(0, copy.getAtom(0).getIndex());
}

public void testCopiedAtomHasCorrectParentMolecule()
{
Molecule molecule = new DefaultMolecule();
molecule.addAtom("C");

Molecule copy = molecule.copy();

assertEquals(copy, copy.getAtom(0).getMolecule());
}

private class Listener implements ChangeListener
{
Expand Down

0 comments on commit cf3e28b

Please sign in to comment.