Skip to content

Commit

Permalink
Added missing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Oct 23, 2010
1 parent ee22b7f commit 6a6c5c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
Expand Up @@ -80,6 +80,16 @@ public static void setRootObject(IChemObject rootObject) {
AbstractChemObjectBuilderTest.rootObject = rootObject;
}

@Test(expected=IllegalArgumentException.class)
public void testNewInstance_Class_arrayObject() throws Exception {
// throw random stuff; it should fail
IChemObjectBuilder builder = rootObject.getBuilder();
builder.newInstance(
IAtom.class,
new Object[2]
);
}

@Test(expected=IllegalArgumentException.class)
public void testIncorrectNumberOf() {
IChemObjectBuilder builder = rootObject.getBuilder();
Expand Down

0 comments on commit 6a6c5c4

Please sign in to comment.