@@ -0,0 +1,1740 @@
+/*%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 */%0A%0Apackage org.biojava.bio.symbol;%0A%0Aimport java.util.*;%0Aimport org.biojava.bio.seq.*;%0Aimport org.biojava.bio.seq.io.*;%0Aimport junit.framework.TestCase;%0A%0Apublic class TranslationTest extends TestCase %7B%0A    private SymbolList dnaForm;%0A    private SymbolList rnaForm;%0A    private SymbolList pepForm;%0A%0A    public TranslationTest(String name) %7B%0A%09super(name);%0A    %7D%0A%0A    protected void setUp() throws Exception %7B%0A%09dnaForm = DNATools.createDNA(%22tttcctgtc%22);%0A%09rnaForm = RNATools.createRNA(%22uuuccuguc%22);%0A%09pepForm = ProteinTools.createProtein(%22FPV%22);%0A    %7D%0A%0A%0A    public void testTranscribe()%0A        throws Exception%0A    %7B%0A%09assertTrue(compareSymbolList(RNATools.transcribe(dnaForm), rnaForm));%0A    %7D%0A%0A    public void testTranslate()%0A        throws Exception%0A    %7B%0A%09assertTrue(compareSymbolList(RNATools.translate(rnaForm), pepForm));%0A    %7D%0A%0A    private boolean compareSymbolList(SymbolList sl1, SymbolList sl2) %7B%0A%09if (sl1.length() != sl2.length()) %7B%0A%09    return false;%0A%09%7D%0A%09%0A%09Iterator si1 = sl1.iterator();%0A%09Iterator si2 = sl2.iterator();%0A%09while (si1.hasNext()) %7B%0A%09    if (! (si1.next() == si2.next())) %7B%0A%09%09return false;%0A%09    %7D%0A%09%7D%0A%0A%09return true;%0A    %7D%0A%7D%0A

Test for DNA->RNA and RNA->protein translation tables.