use of okhttp3.internal.http2.hpackjson.Story in project okhttp by square.
the class HpackRoundTripTest method testRoundTrip.
@ParameterizedTest
@ArgumentsSource(StoriesTestProvider.class)
public void testRoundTrip(Story story) throws Exception {
Assumptions.assumeFalse(story == Story.MISSING, "Test stories missing, checkout git submodule");
Story story2 = story.clone();
// Mutate cases in base class.
for (Case caze : story2.getCases()) {
hpackWriter.writeHeaders(caze.getHeaders());
caze.setWire(bytesOut.readByteString());
}
testDecoder(story2);
}
use of okhttp3.internal.http2.hpackjson.Story in project okhttp by square.
the class HpackRoundTripTest method testRoundTrip.
@Test
public void testRoundTrip() throws Exception {
Story story = getStory().clone();
// Mutate cases in base class.
for (Case caze : story.getCases()) {
hpackWriter.writeHeaders(caze.getHeaders());
caze.setWire(bytesOut.readByteString());
}
testDecoder(story);
}
use of okhttp3.internal.http2.hpackjson.Story in project okhttp by square.
the class HpackDecodeTestBase method testDecoder.
protected void testDecoder(Story story) throws Exception {
for (Case testCase : story.getCases()) {
bytesIn.write(testCase.getWire());
hpackReader.readHeaders();
assertSetEquals(String.format("seqno=%d", testCase.getSeqno()), testCase.getHeaders(), hpackReader.getAndResetHeaderList());
}
}
Aggregations