/// <summary> /// constructor /// </summary> public TempPredictionReader(string filePath, string description, GlobalImportCommon.FileType fileType) { // sanity check if (!File.Exists(filePath)) { throw new FileNotFoundException($"The specified protein function prediction file ({filePath}) does not exist."); } // open the vcf file and parse the header _reader = GZipUtilities.GetAppropriateBinaryReader(filePath); Header = GetHeader(description, filePath, fileType, _reader); }
public void GetAppropriateBinaryReader_Handle_BlockGZipFile() { var randomPath = GetRandomPath(); using (var writer = GZipUtilities.GetBinaryWriter(randomPath)) { writer.Write(ExpectedString); } string observedString; using (var reader = GZipUtilities.GetAppropriateBinaryReader(randomPath)) { observedString = reader.ReadString(); } Assert.Equal(ExpectedString, observedString); }