Skip to content

Commit

Permalink
Added a unit test to see if we get suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Apr 18, 2012
1 parent 2de5acc commit 862d9d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
Expand Up @@ -665,4 +665,15 @@ public void testNewAtom_IElement() {
);
Assert.assertNotNull(af);
}

@Test public void testSugggestion() {
IChemObjectBuilder builder = getRootObject().getBuilder();
try {
builder.newInstance(IAtom.class, Boolean.TRUE);
Assert.fail("I expected an exception, because this constructor does not exist.");
} catch (Exception exception) {
String message = exception.getMessage();
Assert.assertTrue(message.contains("Candidates are"));
}
}
}

0 comments on commit 862d9d9

Please sign in to comment.