Esempio n. 1
0
        public void ValidateDnaAlphabetCompareSymbols()
        {
            DnaAlphabet alp = DnaAlphabet.Instance;

            Assert.IsTrue(alp.CompareSymbols(65, 65));

            ApplicationLog.WriteLine(
                "Alphabets BVT: Validation of CompareSymbols() method completed successfully.");
            Console.WriteLine(
                "Alphabets BVT: Validation of CompareSymbols() method completed successfully.");
        }
Esempio n. 2
0
        public void TestDnaAlphabetTryGetComplementSymbol()
        {
            byte        basicSymbols;
            DnaAlphabet dnaAlphabet = DnaAlphabet.Instance;

            Assert.AreEqual(true, dnaAlphabet.TryGetComplementSymbol((byte)'A', out basicSymbols));
            Assert.AreEqual('T', (char)basicSymbols);

            Assert.AreEqual(true, dnaAlphabet.TryGetComplementSymbol((byte)'T', out basicSymbols));
            Assert.AreEqual('A', (char)basicSymbols);

            Assert.AreEqual(true, dnaAlphabet.TryGetComplementSymbol((byte)'G', out basicSymbols));
            Assert.AreEqual('C', (char)basicSymbols);

            Assert.AreEqual(true, dnaAlphabet.TryGetComplementSymbol((byte)'C', out basicSymbols));
            Assert.AreEqual('G', (char)basicSymbols);
            Assert.AreEqual('G', (char)dnaAlphabet.GetSymbolValueMap()[(byte)'g']);
            Assert.IsTrue(dnaAlphabet.CompareSymbols((byte)'T', (byte)'t'));
            Assert.IsTrue(dnaAlphabet.CompareSymbols((byte)'t', (byte)'T'));
            Assert.AreEqual(dnaAlphabet.GetAmbiguousSymbols().Count, 0);
        }