/// <summary> /// Compare two sequence ranges. /// </summary> /// <param name="nodeName">Xml Node name for different inputs.</param> static void ValidateCompareTwoSequenceRanges(string nodeName) { // Get values from xml. string expectedRangeID = Utility._xmlUtil.GetTextValue( nodeName, Constants.IDNode); string expectedStartIndex = Utility._xmlUtil.GetTextValue( nodeName, Constants.StartNode); string expectedEndIndex = Utility._xmlUtil.GetTextValue( nodeName, Constants.EndNode); string expectedRangeID1 = Utility._xmlUtil.GetTextValue( nodeName, Constants.IDNode1); string expectedStartIndex1 = Utility._xmlUtil.GetTextValue( nodeName, Constants.StartNode1); string expectedEndIndex1 = Utility._xmlUtil.GetTextValue( nodeName, Constants.EndNode1); string expectedResults = Utility._xmlUtil.GetTextValue( nodeName, Constants.ComparisonResult); // Create first SequenceRange. SequenceRange seqRange = new SequenceRange(expectedRangeID, long.Parse(expectedStartIndex), long.Parse(expectedEndIndex)); // Create second SequenceRange. SequenceRange secondSeqRange = new SequenceRange(expectedRangeID1, long.Parse(expectedStartIndex1), long.Parse(expectedEndIndex1)); // Compare two SequenceRanges which are identical. int result = seqRange.CompareTo(secondSeqRange); // Validate result of comparison. Assert.AreEqual(Convert.ToInt32(expectedResults), result); Console.WriteLine("SequenceRange P1 : Successfully validated the SequenceRange comparison"); }
public void ValidateCompareTwoSequenceRanges() { // Get values from xml. string expectedRangeID = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.IDNode); string expectedStartIndex = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.StartNode); string expectedEndIndex = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.EndNode); string expectedRangeID1 = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.IDNode1); string expectedStartIndex1 = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.StartNode1); string expectedEndIndex1 = utilityObj.xmlUtil.GetTextValue( Constants.SequenceRangeNode, Constants.EndNode1); // Create first SequenceRange. SequenceRange seqRange = new SequenceRange(expectedRangeID, long.Parse(expectedStartIndex, (IFormatProvider)null), long.Parse(expectedEndIndex, (IFormatProvider)null)); // Create second SequenceRange. SequenceRange secondSeqRange = new SequenceRange(expectedRangeID1, long.Parse(expectedStartIndex1, (IFormatProvider)null), long.Parse(expectedEndIndex1, (IFormatProvider)null)); // Compare two SequenceRanges which are identical. int result = seqRange.CompareTo(secondSeqRange); // Validate result of comparison. Assert.AreEqual(0, result); Console.WriteLine( "SequenceRange BVT : Successfully validated the SequenceRange comparison"); }
public void ValidateCompareTwoSequenceRanges() { // Get values from xml. string expectedRangeId = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.IDNode); string expectedStartIndex = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.StartNode); string expectedEndIndex = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.EndNode); string expectedRangeId1 = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.IDNode1); string expectedStartIndex1 = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.StartNode1); string expectedEndIndex1 = this.utilityObj.xmlUtil.GetTextValue(Constants.SequenceRangeNode, Constants.EndNode1); // Create first SequenceRange. var seqRange = new SequenceRange(expectedRangeId, long.Parse(expectedStartIndex, null), long.Parse(expectedEndIndex, null)); // Create second SequenceRange. var secondSeqRange = new SequenceRange(expectedRangeId1, long.Parse(expectedStartIndex1, null), long.Parse(expectedEndIndex1, null)); // Compare two SequenceRanges which are identical. int result = seqRange.CompareTo(secondSeqRange); // Validate result of comparison. Assert.AreEqual(0, result); ApplicationLog.WriteLine("SequenceRange BVT : Successfully validated the SequenceRange comparison"); }
/// <summary> /// Compare two sequence ranges. /// </summary> /// <param name="nodeName">Xml Node name for different inputs.</param> private void ValidateCompareTwoSequenceRanges(string nodeName) { // Get values from xml. string expectedRangeId = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.IDNode); string expectedStartIndex = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.StartNode); string expectedEndIndex = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.EndNode); string expectedRangeId1 = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.IDNode1); string expectedStartIndex1 = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.StartNode1); string expectedEndIndex1 = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.EndNode1); string expectedResults = this.utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ComparisonResult); // Create first SequenceRange. var seqRange = new SequenceRange(expectedRangeId, long.Parse(expectedStartIndex, null), long.Parse(expectedEndIndex, null)); // Create second SequenceRange. var secondSeqRange = new SequenceRange(expectedRangeId1, long.Parse(expectedStartIndex1, null), long.Parse(expectedEndIndex1, null)); // Compare two SequenceRanges which are identical. int result = seqRange.CompareTo(secondSeqRange); // Validate result of comparison. Assert.AreEqual(Convert.ToInt32(expectedResults, null), result); ApplicationLog.WriteLine("SequenceRange P1 : Successfully validated the SequenceRange comparison"); }