Permalink
Browse files

Added missing unit test

  • Loading branch information...
1 parent ee22b7f commit 6a6c5c4a973fb12e850de3c8e023136a4e082aa0 @egonw egonw committed Oct 23, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
@@ -81,6 +81,16 @@ public static void setRootObject(IChemObject 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();
builder.newInstance(

0 comments on commit 6a6c5c4

Please sign in to comment.