Skip to content

Commit

Permalink
Fix Asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP committed May 11, 2023
1 parent 011a87d commit 70e7028
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public void DecodesLiteralHeaderFieldNeverIndexed_NewName_ValueBrokenIntoSeparat
_decoder.Decode(encoded[..^(_headerValueString.Length / 2)], endHeaders: false, handler: _handler);
_decoder.Decode(encoded[^(_headerValueString.Length / 2)..], endHeaders: true, handler: _handler);

Assert.Equal(1, _handler.DecodedHeaders.Count);
Assert.Single(_handler.DecodedHeaders);
Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString));
Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]);
}
Expand Down Expand Up @@ -843,7 +843,7 @@ private static void TestDecode(byte[] encoded, string expectedHeaderName, string

if (expectDynamicTableEntry)
{
Assert.Equal(1, dynamicTable.Count);
Assert.Single(dynamicTable);
Assert.Equal(expectedHeaderName, Encoding.ASCII.GetString(dynamicTable[0].Name));
Assert.Equal(expectedHeaderValue, Encoding.ASCII.GetString(dynamicTable[0].Value));
Assert.Equal(expectedHeaderName.Length + expectedHeaderValue.Length + 32, dynamicTable.Size);
Expand Down

0 comments on commit 70e7028

Please sign in to comment.