public void ValidateReadOnlyAlignedSeqGetEnumerator() { ReadOnlyAlignedSequenceCollection readOnlyAlignedSeq = GetReadOnlyAlignedSequence(Constants.SAMFileWithAllFieldsNode); IEnumerator <IAlignedSequence> alignedList = readOnlyAlignedSeq.GetEnumerator(); // Validate enumerator. int index = 0; while (alignedList.MoveNext()) { Assert.AreEqual(alignedList.Current.Sequences[0].ToString(), readOnlyAlignedSeq[index].Sequences[0].ToString()); index++; } ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "ReadOnlyAlignedSeqCollection P1 : Validated the ReadOnlyAlignedSeq GetEnumerator")); Console.WriteLine(string.Format((IFormatProvider)null, "ReadOnlyAlignedSeqCollection P1 : Validated the ReadOnlyAlignedSeq GetEnumerator")); }
public void ValidateReadOnlyAlignedSeqGetIEnumerable() { string filePath = Utility._xmlUtil.GetTextValue(Constants.SAMFileWithAllFieldsNode, Constants.FilePathNode); SAMParser samParserObj = new SAMParser(); samParserObj.EnforceDataVirtualization = true; SequenceAlignmentMap alignedSeqList = samParserObj.Parse(filePath); IList <SAMAlignedSequence> samAlignedList = alignedSeqList.QuerySequences; IEnumerable readOnlyCollections = new ReadOnlyAlignedSequenceCollection(samAlignedList); IEnumerator enumerator = readOnlyCollections.GetEnumerator(); Assert.IsNotNull(enumerator); ApplicationLog.WriteLine(string.Format(null, "ReadOnlyAlignedSeqCollection P1 : Validated the ReadOnlyAlignedSeq GetEnumerator")); Console.WriteLine(string.Format(null, "ReadOnlyAlignedSeqCollection P1 : Validated the ReadOnlyAlignedSeq GetEnumerator")); }