/// <summary> /// General method to invalidate Gff Parser Features. /// </summary> /// <param name="nodeName">xml node name.</param> /// <param name="method">Gff Parse method parameters</param> void InvalidateGffParserFeatures(string nodeName, ParserOrFormatterType method) { try { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode).TestDir(); new GffParser().Parse(filePath).ToList(); Assert.Fail(); } catch (InvalidDataException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (InvalidOperationException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (FormatException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (NotSupportedException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } }
/// <summary> /// General method to invalida Gff Parser Features. /// </summary> /// <param name="nodeName">xml node name.</param> /// <param name="method">Gff Parse method parameters</param> void InvalidateGffParserFeatures( string nodeName, ParserOrFormatterType method) { try { // Gets the expected sequence from the Xml string filePath = _utilityObj._xmlUtil.GetTextValue( nodeName, Constants.FilePathNode); switch (method) { case ParserOrFormatterType.parseFileName: new GffParser().Parse(filePath); break; case ParserOrFormatterType.parseTextReader: using (StreamReader reader = File.OpenText(filePath)) { new GffParser().ParseOne(reader); } break; default: break; } Assert.Fail(); } catch (InvalidDataException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); Console.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (InvalidOperationException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); Console.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (FormatException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); Console.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (NotSupportedException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); Console.WriteLine( "GFF Parser P2 : All the features validated successfully."); } }
/// <summary> /// General method to invalidate Gff Parser Features. /// </summary> /// <param name="nodeName">xml node name.</param> /// <param name="method">Gff Parse method parameters</param> void InvalidateGffParserFeatures(string nodeName, ParserOrFormatterType method) { try { // Gets the expected sequence from the Xml string filePath = utilityObj.xmlUtil.GetTextValue(nodeName,Constants.FilePathNode); new GffParser().Parse(filePath).ToList(); Assert.Fail(); } catch (InvalidDataException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (InvalidOperationException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (FormatException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } catch (NotSupportedException) { ApplicationLog.WriteLine( "GFF Parser P2 : All the features validated successfully."); } }