Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a unit test to see if we get suggestions

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
commit 862d9d9b34a16ed76a35f36fc548e11038312993 1 parent 2de5acc
@egonw authored rajarshi committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
View
11 src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
@@ -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"));
+ }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.