Browse files

Test all bond types

  • Loading branch information...
1 parent d29f631 commit 047b60e9b23ec8bf11c726cf514187fa871bca21 @egonw egonw committed Oct 8, 2009
Showing with 15 additions and 2 deletions.
  1. +15 −2 src/test/org/openscience/cdk/libio/jena/ConvertorTest.java
View
17 src/test/org/openscience/cdk/libio/jena/ConvertorTest.java
@@ -63,11 +63,24 @@
Assert.assertEquals("Unexpected diff: " + diff, 0, diff.length());
}
- @Test public void roundtripBond() {
+ @Test public void roundtripBond_SINGLE() {
+ roundtripBond_Order(IBond.Order.SINGLE);
+ }
+ @Test public void roundtripBond_DOUBLE() {
+ roundtripBond_Order(IBond.Order.DOUBLE);
+ }
+ @Test public void roundtripBond_TRIPLE() {
+ roundtripBond_Order(IBond.Order.TRIPLE);
+ }
+ @Test public void roundtripBond_QUAD() {
+ roundtripBond_Order(IBond.Order.QUADRUPLE);
+ }
+
+ private void roundtripBond_Order(IBond.Order order) {
IMolecule mol = new NNMolecule();
mol.addAtom(new NNAtom("C"));
mol.addAtom(new NNAtom("C"));
- mol.addBond(0,1,IBond.Order.DOUBLE);
+ mol.addBond(0,1,order);
Model model = Convertor.molecule2Model(mol);
IMolecule rtMol = Convertor.model2Molecule(model, builder);
String diff = AtomContainerDiff.diff(mol, rtMol);

0 comments on commit 047b60e

Please sign in to comment.