47 references to _handler
Microsoft.AspNetCore.Shared.Tests (47)
runtime\Http3\QPackDecoderTest.cs (47)
75_decoder.Decode(new byte[] { 0, 0 }, endHeaders: false, handler: _handler);
76_decoder.Decode(_indexedFieldLineStatic, endHeaders: true, handler: _handler);
77Assert.Equal("GET", _handler.DecodedHeaders[":method"]);
79Assert.Equal(":method", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Key);
80Assert.Equal("GET", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Value);
90_decoder.Decode(new byte[] { 0, 0 }, endHeaders: false, handler: _handler);
91_decoder.Decode(encoded, endHeaders: true, handler: _handler);
92Assert.Equal(_headerValueString, _handler.DecodedHeaders[_contentTypeString]);
94Assert.Equal(_contentTypeString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Key);
95Assert.Equal(_headerValueString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Value);
188_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
189_decoder.Decode(encoded, endHeaders: true, handler: _handler);
191Assert.Single(_handler.DecodedHeaders);
192Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
193Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
203_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
204_decoder.Decode(encoded[..1], endHeaders: false, handler: _handler);
205_decoder.Decode(encoded[1..], endHeaders: true, handler: _handler);
207Assert.Single(_handler.DecodedHeaders);
208Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
209Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
219_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
220_decoder.Decode(encoded[..(_literalHeaderFieldString.Length / 2)], endHeaders: false, handler: _handler);
221_decoder.Decode(encoded[(_literalHeaderFieldString.Length / 2)..], endHeaders: true, handler: _handler);
223Assert.Single(_handler.DecodedHeaders);
224Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
225Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
235_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
236_decoder.Decode(encoded[..^_headerValue.Length], endHeaders: false, handler: _handler);
237_decoder.Decode(encoded[^_headerValue.Length..], endHeaders: true, handler: _handler);
239Assert.Single(_handler.DecodedHeaders);
240Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
241Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
251_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
252_decoder.Decode(encoded[..^(_headerValue.Length - 1)], endHeaders: false, handler: _handler);
253_decoder.Decode(encoded[^(_headerValue.Length - 1)..], endHeaders: true, handler: _handler);
255Assert.Single(_handler.DecodedHeaders);
256Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
257Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
267_decoder.Decode(new byte[] { 0x00, 0x00 }, endHeaders: false, handler: _handler);
268_decoder.Decode(encoded[..^(_headerValueString.Length / 2)], endHeaders: false, handler: _handler);
269_decoder.Decode(encoded[^(_headerValueString.Length / 2)..], endHeaders: true, handler: _handler);
271Assert.Single(_handler.DecodedHeaders);
272Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
273Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]);
295QPackDecodingException exception = Assert.Throws<QPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
297Assert.Empty(_handler.DecodedHeaders);