2 Commits
Author SHA1 Message Date
George Barnett 20d2069a4e Add test utilities for FramePayloads (#224)
Motivation:

We have many test utilities for `HTTP2Frame` which predominantly make
assertions about the payload. As part of the work done for #214 we'll
need to make these assertions on the payload rather than the frame.

Modifications:

- Refactor `HTTP2Frame` test utilities to pull the payload assertions
  into separate assertions on `FramePayload`
- `HTTP2Frame` assertions call through to the payload assertions

Result:

We can make assertions about payloads.
2020-08-03 07:44:54 +01:00
George Barnett 3c668f5c7e Add HTTP2Frame.FramePayload codecs (#222)
Motivation:

As part of the work for #214 we need new codecs which transform
`HTTP2Frame.FramePayload` to and from the appropriate request and
response parts.

Modifications:

- Add `HTTP2FramePayloadToHTTP1ClientCodec`
- Add `HTTP2FramePayloadToHTTP1ServerCodec`
- Duplicate the HTTP2ToHTTP1CodecTests and update the relevant parts to
  use payloads instead of frames.
- Add relevant test helpers.
- Note: the HTTP2 to HTTP1 (frame based) codecs haven't been deprecated:
  doing so without warnings depends on #221.

Result:

- We can transform `HTTP2Frame.FramePayload` types to the relevant HTTP
  client and server request and response types.
2020-07-31 10:29:42 +01:00