Skip to content
Browse files

Added a unit test to see if we get suggestions

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>

Conflicts:

	src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java

Change-Id: Ia8fef98ea01adc6ecab9d83d1f46ea678167edf7
  • Loading branch information...
1 parent d6c7c32 commit 31b079b06cd3c46000da142ccb19263668823ada @egonw committed Jan 26, 2012
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
@@ -671,4 +671,15 @@ public void testNewAtom_IElement() {
Assert.assertNotNull(chirality);
Assert.assertEquals(builder, chirality.getBuilder());
}
+
+ @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 31b079b

Please sign in to comment.
Something went wrong with that request. Please try again.