Skip to content

Commit

Permalink
Added testing that properties are read from test6.sdf
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Dec 10, 2009
1 parent a9c85f9 commit d3fe073
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/org/openscience/cdk/io/SDFReaderTest.java
Expand Up @@ -35,6 +35,9 @@
import org.openscience.cdk.ChemFile;
import org.openscience.cdk.ChemModel;
import org.openscience.cdk.Molecule;
import org.openscience.cdk.interfaces.IChemModel;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IMoleculeSet;

/**
* TestCase for the reading MDL mol files using one test file.
Expand Down Expand Up @@ -150,6 +153,15 @@ public class SDFReaderTest extends SimpleChemObjectReaderTest {
for (int i=0; i<sequence.getChemModelCount(); i++) {
Assert.assertNotNull(sequence.getChemModel(i));
}

IChemModel model = sequence.getChemModel(0);
Assert.assertNotNull(model);
IMoleculeSet som = model.getMoleculeSet();
Assert.assertNotNull(som);
Assert.assertEquals(1, som.getMoleculeCount());
IMolecule m = som.getMolecule(0);
Assert.assertNotNull(m);
Assert.assertEquals("ola11", m.getProperty("STRUCTURE ID"));
}

}

0 comments on commit d3fe073

Please sign in to comment.