public void GffParserValidateParseWithOneLineFeatures() { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue( Constants.SimpleGffFeaturesNode, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; GffParser parserObj = new GffParser(filePath); seqs = parserObj.Parse().ToList(); Sequence originalSequence = (Sequence)seqs[0]; bool val = ValidateFeatures(originalSequence, Constants.OneLineSeqGffNodeName); Assert.IsTrue(val); filePath = utilityObj.xmlUtil.GetTextValue( Constants.SimpleGffFeaturesReaderNode, Constants.FilePathNode); GffParser parserObj1 = new GffParser(filePath); seqs.Add(parserObj1.Parse().FirstOrDefault()); originalSequence = (Sequence)seqs[0]; val = ValidateFeatures(originalSequence, Constants.OneLineSeqGffNodeName); Assert.IsTrue(val); ApplicationLog.WriteLine( "GFF Parser BVT : All the features validated successfully."); Console.WriteLine( "GFF Parser BVT : All the features validated successfully."); }
public void GffFormatterValidateFormatString() { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(Constants.SimpleGffNodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; GffParser parserObj = new GffParser(filePath); seqs = parserObj.Parse().ToList(); ISequence originalSequence = (Sequence)seqs[0]; // Use the formatter to write the original sequences to a temp file ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: Creating the Temp file '{0}'.", Constants.GffTempFileName)); GffFormatter formatter = new GffFormatter(); formatter.ShouldWriteSequenceData = true; string formatString = formatter.FormatString(originalSequence); string expectedString = utilityObj.xmlUtil.GetTextValue( Constants.SimpleGffNodeName, Constants.FormatStringNode); expectedString = expectedString.Replace("current-date", DateTime.Today.ToString("yyyy-MM-dd", null)); expectedString = expectedString.Replace("\r", "").Replace("\n", "").Replace(" ", "").Replace("\t", "").ToUpper(CultureInfo.CurrentCulture); string modifedformatString = formatString.Replace("\r", "").Replace("\n", "").Replace(" ", "").Replace("\t", "").ToUpper(CultureInfo.CurrentCulture); Assert.AreEqual(modifedformatString, expectedString); Console.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: The Gff Format String '{0}' are matching with FormatString() method and is as expected.", formatString)); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: The Gff Format String '{0}' are matching with FormatString() method and is as expected.", formatString)); // Passed all the tests, delete the tmp file. If we failed an Assert, // the tmp file will still be there in case we need it for debugging. File.Delete(Constants.GffTempFileName); ApplicationLog.WriteLine("Deleted the temp file created."); }
public void GffParserValidateParseWithOneLineFeatures() { // Gets the expected sequence from the Xml string filePath = Utility._xmlUtil.GetTextValue( Constants.SimpleGffFeaturesNode, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; BasicSequenceParser parserObj = new GffParser(Encodings.Ncbi4NA); seqs = parserObj.Parse(filePath); Sequence originalSequence = (Sequence)seqs[0]; bool val = ValidateFeatures(originalSequence, Constants.OneLineSeqGffNodeName); Assert.IsTrue(val); filePath = Utility._xmlUtil.GetTextValue( Constants.SimpleGffFeaturesReaderNode, Constants.FilePathNode); using (StreamReader reader = File.OpenText(filePath)) { seqs.Add(parserObj.ParseOne(reader)); } originalSequence = (Sequence)seqs[0]; val = ValidateFeatures(originalSequence, Constants.OneLineSeqGffNodeName); Assert.IsTrue(val); ApplicationLog.WriteLine( "GFF Parser BVT : All the features validated successfully."); Console.WriteLine( "GFF Parser BVT : All the features validated successfully."); }
/// <summary> /// Validates the Format() method in Gff Formatter based on the parameters. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> /// <param name="isFilePath">Is file path passed as parameter?</param> /// <param name="isSequenceList">Is sequence list passed as parameter?</param> void ValidateFormatGeneralTestCases(string nodeName, bool isFilePath, bool isSequenceList) { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; GffParser parserObj = new GffParser(filePath); seqs = parserObj.Parse().ToList(); Sequence originalSequence = (Sequence)seqs[0]; // Use the formatter to write the original sequences to a temp file ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: Creating the Temp file '{0}'.", Constants.GffTempFileName)); GffFormatter formatter = new GffFormatter(Constants.GffTempFileName); formatter.ShouldWriteSequenceData = true; if (isFilePath) { if (isSequenceList) { formatter.Write(seqs); } else { formatter.Write(originalSequence); } } else { if (isSequenceList) { formatter.Write(seqs); } else { formatter.Write(originalSequence); } } // Read the new file, then compare the sequences IList <ISequence> seqsNew = null; using (GffParser newParser = new GffParser(Constants.GffTempFileName)) { seqsNew = newParser.Parse().ToList(); } Assert.IsNotNull(seqsNew); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: New Sequence is '{0}'.", seqsNew[0].ToString())); bool val = ValidateFeatures(seqsNew[0], nodeName); Assert.IsTrue(val); ApplicationLog.WriteLine( "GFF Formatter BVT : All the features validated successfully."); Console.WriteLine( "GFF Formatter BVT : All the features validated successfully."); // Now compare the sequences. int countNew = seqsNew.Count(); int expectedCount = 1; Assert.AreEqual(expectedCount, countNew); ApplicationLog.WriteLine("The Number of sequences are matching."); Assert.AreEqual(originalSequence.ID, seqsNew[0].ID); byte[] TempSeqData = new byte[originalSequence.Count]; for (int i = 0; i < originalSequence.Count; i++) { TempSeqData[i] = originalSequence[i]; } string orgSeq = ASCIIEncoding.ASCII.GetString(TempSeqData); ISequence newSeq = seqsNew.FirstOrDefault(); byte[] TempSeqData1 = new byte[newSeq.Count]; for (int i = 0; i < newSeq.Count; i++) { TempSeqData1[i] = newSeq[i]; } string newSeqString = ASCIIEncoding.ASCII.GetString(TempSeqData1); Assert.AreEqual(orgSeq, newSeqString); Console.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: The Gff sequences '{0}' are matching with Format() method and is as expected.", seqsNew[0].ToString())); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: The Gff sequences '{0}' are matching with Format() method.", seqsNew[0].ToString())); // Passed all the tests, delete the tmp file. If we failed an Assert, // the tmp file will still be there in case we need it for debugging. if (File.Exists(Constants.GffTempFileName)) { File.Delete(Constants.GffTempFileName); } ApplicationLog.WriteLine("Deleted the temp file created."); }
/// <summary> /// Parses all test cases related to ParseOne() method based on the /// parameters passed and validates the same. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> /// <param name="isFilePath">Is file path passed as parameter?</param> void ValidateParseOneGeneralTestCases(string nodeName, bool isFilePath) { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); // Logs information to the log file ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT : File Exists in the Path '{0}'.", filePath)); ISequence originalSeq = null; GffParser parserObj = new GffParser(filePath); if (isFilePath) { originalSeq = parserObj.Parse().FirstOrDefault(); } else { using (StreamReader reader = File.OpenText(filePath)) { originalSeq = parserObj.Parse().FirstOrDefault(); } } Assert.IsNotNull(originalSeq); Assert.IsTrue(ValidateFeatures(originalSeq, nodeName)); ApplicationLog.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); Console.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); string expectedSequence = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ExpectedSequenceNode); Sequence seq = (Sequence)originalSeq; Assert.IsNotNull(seq); byte[] TempSeqData = new byte[seq.Count]; for (int i = 0; i < seq.Count; i++) { TempSeqData[i] = seq[i]; } string sequenceInString = ASCIIEncoding.ASCII.GetString(TempSeqData); Assert.AreEqual(expectedSequence, sequenceInString); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Gff sequence '{0}' validation after ParseOne() is found to be as expected.", seq.ToString())); // Logs to the NUnit GUI (Console.Out) window Console.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Gff sequence '{0}' validation after ParseOne() is found to be as expected.", seq.ToString())); byte[] tmpEncodedSeq = new byte[seq.Count]; for (int i = 0; i < seq.Count; i++) { tmpEncodedSeq[i] = seq[i]; } Assert.AreEqual(expectedSequence.Length, tmpEncodedSeq.Length); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Gff Length sequence '{0}' is as expected.", expectedSequence.Length)); string expectedAlphabet = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.AlphabetNameNode).ToLower(CultureInfo.CurrentCulture); Assert.IsNotNull(seq.Alphabet); Assert.AreEqual(seq.Alphabet.Name.ToLower(CultureInfo.CurrentCulture), expectedAlphabet); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence Alphabet is '{0}' and is as expected.", seq.Alphabet.Name)); string expectedSequenceId = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.SequenceIdNode); Assert.AreEqual(expectedSequenceId, seq.ID); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", seq.ID)); // Logs to the NUnit GUI (Console.Out) window Console.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", seq.ID)); }
/// <summary> /// Parses all test cases related to Parse() method based on the /// parameters passed and validates the same. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> void ValidateParseWithStreams(string nodeName) { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); // Logs information to the log file ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT : File Exists in the Path '{0}'.", filePath)); IList <ISequence> seqs = null; using (var reader = File.OpenRead(filePath)) { GffParser parserObj = new GffParser(); { seqs = parserObj.Parse(reader).ToList(); } } int expectedSequenceCount = 1; Assert.IsNotNull(seqs); Assert.AreEqual(expectedSequenceCount, seqs.Count); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT : Number of Sequences found are '{0}'.", seqs.Count.ToString((IFormatProvider)null))); Assert.IsTrue(ValidateFeatures(seqs[0], nodeName)); ApplicationLog.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); string expectedSequence = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ExpectedSequenceNode); Sequence seq = (Sequence)seqs[0]; Assert.IsNotNull(seq); byte[] TempSeqData = new byte[seq.Count]; for (int i = 0; i < seq.Count; i++) { TempSeqData[i] = seq[i]; } string sequenceInString = new string(TempSeqData.Select(x => (char)x).ToArray()); Assert.AreEqual(expectedSequence, sequenceInString); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Gff sequence '{0}' validation after Parse() is found to be as expected.", seq.ToString())); byte[] tmpEncodedSeq = new byte[seq.Count]; for (int i = 0; i < seq.Count; i++) { tmpEncodedSeq[i] = seq[i]; } Assert.AreEqual(expectedSequence.Length, tmpEncodedSeq.Length); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Gff Length sequence '{0}' is as expected.", expectedSequence.Length)); string expectedAlphabet = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.AlphabetNameNode).ToLower(CultureInfo.CurrentCulture); Assert.IsNotNull(seq.Alphabet); Assert.AreEqual(seq.Alphabet.Name.ToLower(CultureInfo.CurrentCulture), expectedAlphabet); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence Alphabet is '{0}' and is as expected.", seq.Alphabet.Name)); string expectedSequenceId = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.SequenceIdNode); Assert.AreEqual(expectedSequenceId, seq.ID); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", seq.ID)); }
/// <summary> /// Parses all test cases related to ParseOne() method based on the /// parameters passed and validates the same. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> /// <param name="isFilePath">Is file path passed as parameter?</param> void ValidateParseOneGeneralTestCases(string nodeName, bool isFilePath) { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); // Logs information to the log file ApplicationLog.WriteLine(string.Format("Gff Parser BVT : File Exists in the Path '{0}'.", filePath)); ISequence originalSeq; GffParser parserObj = new GffParser(); if (isFilePath) { originalSeq = parserObj.Parse(filePath).First(); } else { using (var reader = File.OpenRead(filePath)) { originalSeq = parserObj.Parse(reader).First(); } } Assert.IsNotNull(originalSeq); Assert.IsTrue(ValidateFeatures(originalSeq, nodeName)); ApplicationLog.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); string expectedSequence = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ExpectedSequenceNode); string sequenceInString = new string(originalSeq.Select(x => (char)x).ToArray()); Assert.AreEqual(expectedSequence, sequenceInString); ApplicationLog.WriteLine(string.Format("Gff Parser BVT: The Gff sequence '{0}' validation after ParseOne() is found to be as expected.", originalSeq.ToString())); byte[] tmpEncodedSeq = new byte[originalSeq.Count]; for (int i = 0; i < originalSeq.Count; i++) { tmpEncodedSeq[i] = originalSeq[i]; } Assert.AreEqual(expectedSequence.Length, tmpEncodedSeq.Length); ApplicationLog.WriteLine(string.Format("Gff Parser BVT: The Gff Length sequence '{0}' is as expected.", expectedSequence.Length)); string expectedAlphabet = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.AlphabetNameNode).ToLower(CultureInfo.CurrentCulture); Assert.IsNotNull(originalSeq.Alphabet); Assert.AreEqual(originalSeq.Alphabet.Name.ToLower(CultureInfo.CurrentCulture), expectedAlphabet); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence Alphabet is '{0}' and is as expected.", originalSeq.Alphabet.Name)); string expectedSequenceId = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.SequenceIdNode); Assert.AreEqual(expectedSequenceId, originalSeq.ID); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", originalSeq.ID)); }
public void GffFormatterValidateStreams() { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(Constants.SimpleGffNodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; Sequence originalSequence = null; GffParser parserObj = new GffParser(); { seqs = parserObj.Parse(filePath).ToList(); originalSequence = (Sequence)seqs[0]; } // Use the formatter to write the original sequences to a temp file ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: Creating the Temp file '{0}'.", Constants.GffTempFileName)); using (var writer = File.Create(Constants.GffTempFileName)) { GffFormatter formatter = new GffFormatter() { ShouldWriteSequenceData = true }; formatter.Format(writer, originalSequence); } // Read the new file, then compare the sequences IList <ISequence> seqsNew = null; GffParser newParser = new GffParser(); seqsNew = newParser.Parse(Constants.GffTempFileName).ToList(); Assert.IsNotNull(seqsNew); ApplicationLog.WriteLine(string.Format("Gff Formatter BVT: New Sequence is '{0}'.", seqsNew[0])); bool val = ValidateFeatures(seqsNew[0], Constants.SimpleGffNodeName); Assert.IsTrue(val); ApplicationLog.WriteLine( "GFF Formatter BVT : All the features validated successfully."); // Now compare the sequences. int countNew = seqsNew.Count(); int expectedCount = 1; Assert.AreEqual(expectedCount, countNew); ApplicationLog.WriteLine("The Number of sequences are matching."); Assert.AreEqual(originalSequence.ID, seqsNew[0].ID); ISequence newSeq = seqsNew.FirstOrDefault(); Assert.AreEqual(new string(originalSequence.Select(x => (char)x).ToArray()), new string(newSeq.Select(x => (char)x).ToArray())); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Gff Formatter BVT: The Gff sequences '{0}' are matching with Write() method.", seqsNew[0].ToString())); // Passed all the tests, delete the tmp file. If we failed an Assert, // the tmp file will still be there in case we need it for debugging. if (File.Exists(Constants.GffTempFileName)) { File.Delete(Constants.GffTempFileName); } ApplicationLog.WriteLine("Deleted the temp file created."); }
/// <summary> /// Validates the Format() method in Gff Formatter based on the parameters. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> /// <param name="isFilePath">Is file path passed as parameter?</param> /// <param name="isSequenceList">Is sequence list passed as parameter?</param> static void ValidateFormatGeneralTestCases(string nodeName, bool isFilePath, bool isSequenceList) { // Gets the expected sequence from the Xml string filePath = Utility._xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); IList <ISequence> seqs = null; GffParser parserObj = new GffParser(); seqs = parserObj.Parse(filePath); Sequence originalSequence = (Sequence)seqs[0]; // Use the formatter to write the original sequences to a temp file ApplicationLog.WriteLine(string.Format(null, "Gff Formatter BVT: Creating the Temp file '{0}'.", Constants.GffTempFileName)); GffFormatter formatter = new GffFormatter(); formatter.ShouldWriteSequenceData = true; if (isFilePath) { if (isSequenceList) { formatter.Format(seqs, Constants.GffTempFileName); } else { formatter.Format(originalSequence, Constants.GffTempFileName); } } else { if (isSequenceList) { using (TextWriter writer = new StreamWriter(Constants.GffTempFileName)) { formatter.Format(seqs, writer); } } else { using (TextWriter writer = new StreamWriter(Constants.GffTempFileName)) { formatter.Format(originalSequence, writer); } } } // Read the new file, then compare the sequences IList <ISequence> seqsNew = null; GffParser newParser = new GffParser(); seqsNew = newParser.Parse(Constants.GffTempFileName); Assert.IsNotNull(seqsNew); ApplicationLog.WriteLine(string.Format(null, "Gff Formatter BVT: New Sequence is '{0}'.", seqsNew[0].ToString())); bool val = ValidateFeatures(seqsNew[0], nodeName); Assert.IsTrue(val); ApplicationLog.WriteLine( "GFF Formatter BVT : All the features validated successfully."); Console.WriteLine( "GFF Formatter BVT : All the features validated successfully."); // Now compare the sequences. int countNew = seqsNew.Count(); int expectedCount = 1; Assert.AreEqual(expectedCount, countNew); ApplicationLog.WriteLine("The Number of sequences are matching."); Assert.AreEqual(originalSequence.ID, seqsNew[0].ID); string orgSeq = originalSequence.ToString(); string newSeq = seqsNew[0].ToString(); Assert.AreEqual(orgSeq, newSeq); Console.WriteLine(string.Format(null, "Gff Formatter BVT: The Gff sequences '{0}' are matching with Format() method and is as expected.", seqsNew[0].ToString())); ApplicationLog.WriteLine(string.Format(null, "Gff Formatter BVT: The Gff sequences '{0}' are matching with Format() method.", seqsNew[0].ToString())); // Passed all the tests, delete the tmp file. If we failed an Assert, // the tmp file will still be there in case we need it for debugging. if (File.Exists(Constants.GffTempFileName)) { File.Delete(Constants.GffTempFileName); } ApplicationLog.WriteLine("Deleted the temp file created."); }
/// <summary> /// Parses all test cases related to Parse() method based on the /// parameters passed and validates the same. /// </summary> /// <param name="nodeName">Xml Node name to be read.</param> /// <param name="isFilePath">Is file path passed as parameter?</param> static void ValidateParseGeneralTestCases(string nodeName, bool isFilePath) { // Gets the expected sequence from the Xml string filePath = Utility._xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); Assert.IsTrue(File.Exists(filePath)); // Logs information to the log file ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT : File Exists in the Path '{0}'.", filePath)); IList <ISequence> seqs = null; GffParser parserObj = new GffParser(); if (isFilePath) { seqs = parserObj.Parse(filePath); } else { using (StreamReader reader = File.OpenText(filePath)) { seqs = parserObj.Parse(reader); } } int expectedSequenceCount = 1; Assert.IsNotNull(seqs); Assert.AreEqual(expectedSequenceCount, seqs.Count); ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT : Number of Sequences found are '{0}'.", seqs.Count.ToString((IFormatProvider)null))); Assert.IsTrue(ValidateFeatures(seqs[0], nodeName)); ApplicationLog.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); Console.WriteLine( "Gff Parser BVT : Successfully validated all the Features for a give Sequence in GFF File."); string expectedSequence = Utility._xmlUtil.GetTextValue(nodeName, Constants.ExpectedSequenceNode); Sequence seq = (Sequence)seqs[0]; Assert.IsNotNull(seq); Assert.AreEqual(expectedSequence, seq.ToString()); ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT: The Gff sequence '{0}' validation after Parse() is found to be as expected.", seq.ToString())); // Logs to the NUnit GUI (Console.Out) window Console.WriteLine(string.Format(null, "Gff Parser BVT: The Gff sequence '{0}' validation after Parse() is found to be as expected.", seq.ToString())); Assert.AreEqual(expectedSequence.Length, seq.EncodedValues.Length); ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT: The Gff Length sequence '{0}' is as expected.", expectedSequence.Length)); string expectedAlphabet = Utility._xmlUtil.GetTextValue(nodeName, Constants.AlphabetNameNode).ToLower(CultureInfo.CurrentCulture); Assert.IsNotNull(seq.Alphabet); Assert.AreEqual(seq.Alphabet.Name.ToLower(CultureInfo.CurrentCulture), expectedAlphabet); ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT: The Sequence Alphabet is '{0}' and is as expected.", seq.Alphabet.Name)); string expectedSequenceId = Utility._xmlUtil.GetTextValue(nodeName, Constants.SequenceIdNode); Assert.AreEqual(expectedSequenceId, seq.DisplayID); ApplicationLog.WriteLine(string.Format(null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", seq.DisplayID)); // Logs to the NUnit GUI (Console.Out) window Console.WriteLine(string.Format(null, "Gff Parser BVT: The Sequence ID is '{0}' and is as expected.", seq.DisplayID)); }