-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8049eae
commit a96b4f8
Showing
8 changed files
with
38 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,8 @@ public void testNonBlockingParser() throws Exception { | |
verify(mockListener).onValue(eq(provider.primitive("abcd")), any(ParsingContext.class)); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
@Ignore | ||
public void testProtobufParser() throws Exception { | ||
JsonPathListener mockListener = mock(JsonPathListener.class); | ||
|
||
|
@@ -90,21 +90,14 @@ public void testProtobufParser() throws Exception { | |
+ "}\n"; | ||
final ProtobufSchema schema = ProtobufSchemaLoader.std.parse(protobuf_str); | ||
|
||
// Employee boss = new Employee(); | ||
// boss.age = 30; | ||
// boss.emails = new String[]{"[email protected]"}; | ||
// boss.name = "bar"; | ||
|
||
Employee empl = new Employee(); | ||
empl.age = 30; | ||
empl.emails = new String[]{"[email protected]"}; | ||
empl.name = "foo"; | ||
// empl.boss = boss; | ||
|
||
byte[] protobufData = mapper.writer(schema) | ||
.writeValueAsBytes(empl); | ||
|
||
// TODO Jackson's bug | ||
// TODO Jackson's bug to be fixed in 2.9.6 | ||
JsonSurfer protobufSurfer = new JsonSurfer(new JacksonParser(new ProtobufFactory(), schema), provider); | ||
SurfingConfiguration config = protobufSurfer.configBuilder().bind("$.name", mockListener).build(); | ||
protobufSurfer.surf(new ByteArrayInputStream(protobufData), config); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters