@@ -0,0 +1,1913 @@
+/*%0A *                    BioJava development code%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  If you do not have a copy,%0A * see:%0A *%0A *      http://www.gnu.org/copyleft/lesser.html%0A *%0A * Copyright for this code is held jointly by the individual%0A * authors.  These should be listed in @author doc comments.%0A *%0A * For more information on the BioJava project and its aims,%0A * or to join the biojava-l mailing list, visit the home page%0A * at:%0A *%0A *      http://www.biojava.org/%0A *%0A * Created on May 26, 2010%0A *%0A */%0Apackage org.biojava.bio.structure.align.ce;%0A%0Aimport org.biojava.bio.structure.Atom;%0Aimport org.biojava.bio.structure.TmpAtomCache;%0Aimport org.biojava.bio.structure.align.StructureAlignment;%0Aimport org.biojava.bio.structure.align.StructureAlignmentFactory;%0Aimport org.biojava.bio.structure.align.model.AFPChain;%0Aimport org.biojava.bio.structure.align.xml.AFPChainXMLConverter;%0Aimport org.biojava.bio.structure.align.xml.AFPChainXMLParser;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class TestSmallAlignment extends TestCase%7B%0A%0A%0A%09public void test1a4w()%7B%0A%0A%09%09String name1 = %221a4w.I%22;%0A%09%09String name2 = %221a4w.H%22;%0A%09%09try %7B%0A%09%09%09Atom%5B%5D ca1 = TmpAtomCache.cache.getAtoms(name1);%0A%09%09%09Atom%5B%5D ca2 = TmpAtomCache.cache.getAtoms(name2);%0A%0A%09%09%09StructureAlignment ce =StructureAlignmentFactory.getAlgorithm(CeMain.algorithmName);%0A%0A%09%09%09AFPChain afpChain = ce.align(ca1, ca2);%0A%0A%09%09%09assertTrue(afpChain != null);%0A%0A%09%09%09assertTrue(afpChain.getNrEQR() ==0 );%0A%09%09%09%0A%09%09%09String xml = AFPChainXMLConverter.toXML(afpChain,ca1,ca2);%0A%09%09%09%0A%09%09%09AFPChain newChain = AFPChainXMLParser.fromXML(xml, ca1, ca2);%0A%09%09%09assertTrue(newChain != null);%0A%09%09%09%0A%09%09%09String xml2 = AFPChainXMLConverter.toXML(newChain,ca1,ca2);%0A%09%09%09%0A%09%09%09assertEquals(xml,xml2);%0A%09%09%09%0A%09%09%09%0A%09%09%7D catch (Exception e)%7B%0A%09%09%09e.printStackTrace();%0A%09%09%09fail(e.getMessage());%0A%09%09%7D%0A%0A%09%7D%0A%7D%0A

test for too short alignments