Esempio n. 1
0
 /** Overwrite the method in {@link AbstractAtomTest} to always expect zero hydrogen counts. */
 @Test
 public void testGetHydrogenCount() {
   // expect zero by definition
   IAtom a = (IAtom) newChemObject();
   Assert.assertNull(a.getImplicitHydrogenCount());
   a.setImplicitHydrogenCount(5);
   Assert.assertEquals(5, a.getImplicitHydrogenCount().intValue());
   a.setImplicitHydrogenCount(null);
   Assert.assertNull(a.getImplicitHydrogenCount());
 }
Esempio n. 2
0
  /** Overwrite the method in {@link AbstractAtomTest} to always expect zero hydrogen counts. */
  @Test
  @Override
  public void testClone_HydrogenCount() throws Exception {
    IAtom atom = (IAtom) newChemObject();
    atom.setImplicitHydrogenCount(3);
    IAtom clone = (IAtom) atom.clone();

    // test cloning
    atom.setImplicitHydrogenCount(4);
    Assert.assertEquals(3, clone.getImplicitHydrogenCount().intValue());
  }