Skip to content

Commit

Permalink
Added another Header TryParse test
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Jun 22, 2024
1 parent 5bef376 commit 56fe291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UnitTests/HeaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ public void TestParserCanonicalization ()
[Test]
public void TestParseInvalidHeader ()
{
Assert.That (Header.TryParse ("This is invalid", out _), Is.False, "TryParse");
const string input = "This is invalid";
var raw = Encoding.ASCII.GetBytes (input);

Assert.That (Header.TryParse (input, out _), Is.False, "TryParse(string)");
Assert.That (Header.TryParse (raw, 0, raw.Length, out _), Is.False, "TryParse(byte[])");
}

[Test]
Expand Down

0 comments on commit 56fe291

Please sign in to comment.