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>

Conflicts:

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

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