Пример #1
0
        public void TestAllAlphabetsToString()
        {
            DnaAlphabet              dna              = DnaAlphabet.Instance;
            RnaAlphabet              rna              = RnaAlphabet.Instance;
            ProteinAlphabet          protein          = ProteinAlphabet.Instance;
            AmbiguousDnaAlphabet     dnaAmbiguous     = AmbiguousDnaAlphabet.Instance;
            AmbiguousRnaAlphabet     rnaAmbiguous     = AmbiguousRnaAlphabet.Instance;
            AmbiguousProteinAlphabet proteinAmbiguous = AmbiguousProteinAlphabet.Instance;

            string dnaStringActual              = dna.ToString();
            string rnaStringActual              = rna.ToString();
            string proteinStringActual          = protein.ToString();
            string dnaAmbiguousStringActual     = dnaAmbiguous.ToString();
            string rnaAmbiguousStringActual     = rnaAmbiguous.ToString();
            string proteinAmbiguousStringActual = proteinAmbiguous.ToString();

            string dnaStringExpected              = "ACGT-";
            string rnaStringExpected              = "ACGU-";
            string proteinStringExpected          = "ACDEFGHIKLMNOPQRSTUVWY-*";
            string dnaAmbiguousStringExpected     = "ACGT-MRSWYKVHDBN";
            string rnaAmbiguousStringExpected     = "ACGU-NMRSWYKVHDB";
            string proteinAmbiguousStringExpected = "ACDEFGHIKLMNOPQRSTUVWY-*XZBJ";

            Assert.AreEqual(dnaStringExpected, dnaStringActual);
            Assert.AreEqual(rnaStringExpected, rnaStringActual);
            Assert.AreEqual(proteinStringExpected, proteinStringActual);
            Assert.AreEqual(dnaAmbiguousStringExpected, dnaAmbiguousStringActual);
            Assert.AreEqual(rnaAmbiguousStringExpected, rnaAmbiguousStringActual);
            Assert.AreEqual(proteinAmbiguousStringExpected, proteinAmbiguousStringActual);
        }
Пример #2
0
        public void ValidateAllAlphabetsToString()
        {
            DnaAlphabet              dna              = DnaAlphabet.Instance;
            RnaAlphabet              rna              = RnaAlphabet.Instance;
            ProteinAlphabet          protein          = ProteinAlphabet.Instance;
            AmbiguousDnaAlphabet     dnaAmbiguous     = AmbiguousDnaAlphabet.Instance;
            AmbiguousRnaAlphabet     rnaAmbiguous     = AmbiguousRnaAlphabet.Instance;
            AmbiguousProteinAlphabet proteinAmbiguous = AmbiguousProteinAlphabet.Instance;

            string dnaStringActual              = dna.ToString();
            string rnaStringActual              = rna.ToString();
            string proteinStringActual          = protein.ToString();
            string dnaAmbiguousStringActual     = dnaAmbiguous.ToString();
            string rnaAmbiguousStringActual     = rnaAmbiguous.ToString();
            string proteinAmbiguousStringActual = proteinAmbiguous.ToString();

            Assert.AreEqual("ACGT-", dnaStringActual);
            Assert.AreEqual("ACGU-", rnaStringActual);
            Assert.AreEqual("ACDEFGHIKLMNOPQRSTUVWY-*", proteinStringActual);
            Assert.AreEqual("ACGT-MRSWYKVHDBN", dnaAmbiguousStringActual);
            Assert.AreEqual("ACGU-NMRSWYKVHDB", rnaAmbiguousStringActual);
            Assert.AreEqual("ACDEFGHIKLMNOPQRSTUVWY-*XZBJ", proteinAmbiguousStringActual);
        }