public void ParseTags_LessThanFourColumn_ThrowException() { const string tagLine = "#CHROM\tPOS\tREF\n"; using (var caParser = new CustomAnnotationsParser(GetReadStream(tagLine), null)) { Assert.Throws <UserErrorException>(() => caParser.ParseTags()); } }
public void ParseTypes_InvalidType_ThrowException(string type) { string tagAndTypeLines = "#CHROM\tPOS\tREF\tALT\tValue\n" + $"#type\t.\t.\t.\t{type}"; using (var caParser = new CustomAnnotationsParser(GetReadStream(tagAndTypeLines), null)) { caParser.ParseTags(); Assert.Throws <UserErrorException>(() => caParser.ParseTypes()); } }
public void ParseTypes_ValidType_Pass(string type) { string tagAndTypeLines = "#CHROM\tPOS\tREF\tALT\tValue\n" + $"#type\t.\t.\t.\t{type}"; using (var caParser = new CustomAnnotationsParser(GetReadStream(tagAndTypeLines), null)) { caParser.ParseTags(); caParser.ParseTypes(); } }
public void CheckPosAndRefColumns_InvalidPosOrRef_ThrowException() { const string tagLine = "#CHROM\t\tREF\tALT\n"; using (var caParser = new CustomAnnotationsParser(GetReadStream(tagLine), null)) { Assert.Throws <UserErrorException>(() => caParser.ParseTags()); } const string tagLine2 = "#CHROM\tPOS\tREFERENCE\tALT\n"; using (var caParser = new CustomAnnotationsParser(GetReadStream(tagLine2), null)) { Assert.Throws <UserErrorException>(() => caParser.ParseTags()); } }