public void GetTag_Tests() { // create a tag TagUtils tagUtils = new TagUtils(); tagUtils.AddIntTag("NM", 5); tagUtils.AddStringTag("XU", "ABCD"); tagUtils.AddCharTag("XP", '?'); byte[] tagData = tagUtils.ToBytes(); var alignment = new BamAlignment() { TagData = tagData }; // string tag scenarios Assert.Equal("ABCD", alignment.GetStringTag("XU")); Assert.Equal("?", alignment.GetStringTag("XP")); Assert.Throws <ApplicationException>(() => alignment.GetStringTag("NM")); Assert.Equal(null, alignment.GetStringTag("AB")); }