public void ValidateDnaDerivedSequenceGetComplemented() { // Get input and expected values from xml string expectedSequence = utilityObj.xmlUtil.GetTextValue( Constants.DnaDerivedSequenceNode, Constants.ExpectedSequence); string alphabetName = utilityObj.xmlUtil.GetTextValue( Constants.DnaDerivedSequenceNode, Constants.AlphabetNameNode); string complementObj = utilityObj.xmlUtil.GetTextValue( Constants.DnaDerivedSequenceNode, Constants.Complement); string derivedSequence = utilityObj.xmlUtil.GetTextValue( Constants.DnaDerivedSequenceNode, Constants.DerivedSequence); IAlphabet alphabet = Utility.GetAlphabet(alphabetName); // Create derived Sequence DerivedSequence derSequence = CreateDerivedSequence( alphabet, expectedSequence); // Validate IndexOf() derived Sequence. Assert.AreEqual(derivedSequence, new string(derSequence.Select(a => (char)a).ToArray())); Assert.AreEqual(complementObj, new string(derSequence.GetComplementedSequence().Select(a => (char)a).ToArray())); Console.WriteLine( "DerivedSequenceBvtTestCases:Validation of GetComplementedSequence() method of derived sequence completed successfully"); ApplicationLog.WriteLine( "DerivedSequenceBvtTestCases:Validation of GetComplementedSequence() method of derived sequence completed successfully"); }
public void TestGetComplementedSequence() { const string sequence = "ATGCC"; const string expectedSequence = "TACGG"; ISequence orignalSequence = new Sequence(Alphabets.DNA, sequence); DerivedSequence deriveSequence = new DerivedSequence(orignalSequence, false, false); string actualSequence = new string(deriveSequence.GetComplementedSequence().Select(a => (char)a).ToArray()); Assert.AreEqual(expectedSequence, actualSequence); }
public void TestGetComplementedSequence() { const string sequence = "ATGCC"; const string expectedSequence = "TACGG"; ISequence orignalSequence = new Sequence(Alphabets.DNA, sequence); DerivedSequence deriveSequence = new DerivedSequence(orignalSequence, false, false); string actualSequence = new string(deriveSequence.GetComplementedSequence().Select(a => (char)a).ToArray()); Assert.AreEqual(expectedSequence, actualSequence); }