public void testItShouldChangeItsSymbolWhenGivenAValidNewOne() { Molecule molecule = new DefaultMolecule(); Atom atom = molecule.addAtom("C"); atom.setSymbol("O"); assertEquals("O", atom.getSymbol()); }
public void testItShouldThrowWhenSettingAnIllegalAtomLabel() { Molecule molecule = new DefaultMolecule(); Atom atom = molecule.addAtom("C"); try { atom.setSymbol("bailout"); fail(); } catch (IllegalStateException e) { } }