use of com.fasterxml.jackson.core.testsupport.MockDataInput in project jackson-core by FasterXML.
the class JsonParserClosedCaseTest method parsers.
/**
* Creates a list of parsers to tests.
*
* @return List of Object[2]. Object[0] is is the name of the class, Object[1] is instance itself.
* @throws IOException when closing stream fails.
*/
@Parameters(name = "{0}")
public static Collection<Object[]> parsers() throws IOException {
ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[] { '{', '}' });
ObjectReadContext ctxt = ObjectReadContext.empty();
return closeParsers(JSON_F.createParser(ctxt, new InputStreamReader(inputStream)), JSON_F.createParser(ctxt, inputStream), JSON_F.createParser(ctxt, new MockDataInput("{}")));
}
Aggregations