Skip to content

Commit

Permalink
Unit test: passing an incorrect second new Bond(IAtom, IAtom) should …
Browse files Browse the repository at this point in the history
…throw an IllegalArgumentException

Change-Id: I52918dcffbd64e37cf5f254b2d6cba01c73d1f3f
  • Loading branch information
egonw committed May 15, 2012
1 parent d7338ec commit 4205ab5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
Expand Up @@ -224,7 +224,20 @@ public void testNewAtom_IElement() {
);
Assert.assertNotNull(bond);
}


/**
* @cdk.bug 3526870
*/
@Test(expected=IllegalArgumentException.class)
public void testNewBond_IAtom_IMolecule() {
IChemObjectBuilder builder = rootObject.getBuilder();
builder.newInstance(
IBond.class,
builder.newInstance(IAtom.class),
builder.newInstance(IMolecule.class)
);
}

@Test public void testNewBond_IAtom_IAtom_IBond_Order() {
IChemObjectBuilder builder = rootObject.getBuilder();
IBond bond = builder.newInstance(
Expand Down

0 comments on commit 4205ab5

Please sign in to comment.