Permalink
Browse files

Backport patch, to make the patches compile with cdk-1.2.x

Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
1 parent 6cf95db commit ce9b1bd9b36fd55a3cc2890ac1bae3f646c2f42b @egonw egonw committed with rajarshi Jul 27, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/test/org/openscience/cdk/interfaces/AbstractBondTest.java
@@ -92,16 +92,16 @@ public void testSetAtoms_arrayIAtom() {
@Test
public void testSetAtom_SomeNull() {
IBond b = (IBond)newChemObject();
- b.setAtom(b.getBuilder().newInstance(IAtom.class,"C"), 0);
+ b.setAtom(b.getBuilder().newAtom("C"), 0);
Assert.assertEquals(1, b.getAtomCount());
}
@Test
public void testUnSetAtom() {
IBond b = (IBond)newChemObject();
- b.setAtom(b.getBuilder().newInstance(IAtom.class,"C"), 0);
+ b.setAtom(b.getBuilder().newAtom("C"), 0);
Assert.assertEquals(1, b.getAtomCount());
- b.setAtom(b.getBuilder().newInstance(IAtom.class,"C"), 0);
+ b.setAtom(b.getBuilder().newAtom("C"), 0);
Assert.assertEquals(1, b.getAtomCount());
b.setAtom(null, 0);
Assert.assertEquals(0, b.getAtomCount());
@@ -112,9 +112,9 @@ public void testUnSetAtom() {
@Test
public void testOverwriteAtom() {
IBond b = (IBond)newChemObject();
- b.setAtom(b.getBuilder().newInstance(IAtom.class,"C"), 0);
+ b.setAtom(b.getBuilder().newAtom("C"), 0);
Assert.assertEquals(1, b.getAtomCount());
- b.setAtom(b.getBuilder().newInstance(IAtom.class,"C"), 0);
+ b.setAtom(b.getBuilder().newAtom("C"), 0);
Assert.assertEquals(1, b.getAtomCount());
// test overwrite with null

0 comments on commit ce9b1bd

Please sign in to comment.