use of net.morimekta.providence.serializer.JsonSerializer in project providence by morimekta.
the class MessageProgramParserTest method testParse.
@Test
public void testParse() throws IOException {
MessageProgramParser parser = new MessageProgramParser(new JsonSerializer());
ByteArrayInputStream in = new ByteArrayInputStream(("{\n" + " \"namespaces\": {\n" + " \"java\": \"net.morimekta.providence\"\n" + " }\n" + "}").getBytes(StandardCharsets.UTF_8));
ProgramType program = parser.parse(in, new File("test.json"), ImmutableSet.of());
assertThat(program.getNamespaces(), is(ImmutableMap.of("java", "net.morimekta.providence")));
}
Aggregations