@Test
public void testReading() throws Exception {
String filename = "data/asn/pubchem/cid1145.xml";
logger.info("Testing: " + filename);
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
PCCompoundXMLReader reader = new PCCompoundXMLReader(ins);
IAtomContainer molecule = (IAtomContainer) reader.read(new AtomContainer());
reader.close();
Assert.assertNotNull(molecule);
Assert.assertEquals(14, molecule.getAtomCount());
Assert.assertEquals("O", molecule.getAtom(0).getSymbol());
Assert.assertEquals(Integer.valueOf(-1), molecule.getAtom(0).getFormalCharge());
Assert.assertEquals("N", molecule.getAtom(1).getSymbol());
Assert.assertEquals(Integer.valueOf(1), molecule.getAtom(1).getFormalCharge());
Assert.assertEquals(13, molecule.getBondCount());
Assert.assertNotNull(molecule.getBond(3));
Assert.assertNull(molecule.getAtom(0).getPoint3d());
Point2d point = molecule.getAtom(0).getPoint2d();
Assert.assertNotNull(point);
Assert.assertEquals(3.7320508956909, point.x, 0.00000001);
Assert.assertEquals(0.5, point.y, 0.00000001);
}