Skip to content

Commit

Permalink
added a new test for bondtools
Browse files Browse the repository at this point in the history
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
Stefan Kuhn authored and egonw committed Jul 31, 2009
1 parent 6380578 commit 13f72bd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/org/openscience/cdk/geometry/BondToolsTest.java
Expand Up @@ -160,6 +160,19 @@ public void testIsValidDoubleBondConfiguration_IAtomContainer_IBond() throws Exc
Assert.assertFalse(BondTools.isStereo(mol,mol.getAtom(1)));
}

@Test public void testIsStereo_IAtomContainer_IAtom_forinvalid() throws Exception {
String filename = "data/mdl/trigonal_bipyramidal.mol";
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
MDLV2000Reader reader = new MDLV2000Reader(ins);
ChemFile chemFile = (ChemFile)reader.read((ChemObject)new ChemFile());
IMolecule mol=chemFile.getChemSequence(0).getChemModel(0).getMoleculeSet().getMolecule(0);
for(int i=1;i<6;i++){
mol.getAtom(i).setSymbol("C");
}
Assert.assertFalse(BondTools.isStereo(mol,mol.getAtom(0)));
Assert.assertFalse(BondTools.isStereo(mol,mol.getAtom(1)));
}

@Test public void testIsSquarePlanar_IAtomContainer_IAtom() throws Exception {
String filename = "data/mdl/squareplanar.mol";
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
Expand Down

0 comments on commit 13f72bd

Please sign in to comment.