HetatomImpl implements Group,Serializable { public String getChainId() { if (parent == null) { return ""; } return parent.getChainID(); } HetatomImpl(); boolean has3D(); void setPDBFlag(boolean flag); @Deprecated String getPDBCode(); @Deprecated void setPDBCode(String pdb_code); void setPDBName(String s); String getPDBName(); void addAtom(Atom atom); void clearAtoms(); int size(); List<Atom> getAtoms(); void setAtoms(List<Atom> atoms); Atom getAtom(String name); Atom getAtomByPDBname(String name); Atom getAtom(int position); boolean hasAtom(String fullName); String getType(); String toString(); boolean hasAminoAtoms(); void setProperties(Map<String,Object> props); Map<String, Object> getProperties(); void setProperty(String key, Object value); Object getProperty(String key); Iterator<Atom> iterator(); Object clone(); void setParent(Chain parent); Chain getParent(); long getId(); void setId(long id); ChemComp getChemComp(); void setChemComp(ChemComp cc); void setChain(Chain chain); Chain getChain(); String getChainId(); ResidueNumber getResidueNumber(); void setResidueNumber(ResidueNumber residueNumber); void setResidueNumber(String chainId, Integer resNum, Character iCode); boolean hasAltLoc(); List<Group> getAltLocs(); void addAltLoc(Group group); static final String type; }
@Test public void testGetChainId() { Chain chain = new ChainImpl(); chain.setChainID("A"); HetatomImpl instance = new HetatomImpl(); instance.setChain(chain); String expResult = "A"; String result = instance.getChainId(); assertEquals(expResult, result); }