File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
protobuf/src/test/java/com/fasterxml/jackson/dataformat/protobuf/schema Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1
1
package com .fasterxml .jackson .dataformat .protobuf .schema ;
2
2
3
- /**
4
- * Created by user on 5/13/17.
5
- */
6
- public class DescriptorLoaderCompleteTest
3
+ import com .fasterxml .jackson .databind .ObjectMapper ;
4
+ import com .fasterxml .jackson .databind .ObjectWriter ;
5
+ import com .fasterxml .jackson .dataformat .protobuf .ProtobufFactory ;
6
+ import com .fasterxml .jackson .dataformat .protobuf .ProtobufTestBase ;
7
+
8
+ import java .io .InputStream ;
9
+ import java .io .StringReader ;
10
+
11
+ public class DescriptorLoaderCompleteTest extends ProtobufTestBase
7
12
{
13
+
14
+ private final ObjectMapper MAPPER = new ObjectMapper (new ProtobufFactory ());
15
+
16
+
17
+ public void testParsing () throws Exception
18
+ {
19
+ // load unittest.desc descriptor file.
20
+ // This file was created at the top directory of Protobuf project.
21
+ // protoc - o unittest_proto3.desc google/protobuf/unittest_proto3.proto
22
+ InputStream in = this .getClass ().getResourceAsStream ("/unittest_proto3.desc" );
23
+ FileDescriptorSet fds = DescriptorLoader .std .load (in );
24
+ ProtobufSchema schema2 = fds .forType ("TestAllTypes" );
25
+ assertNotNull (schema2 );
26
+ }
8
27
}
You can’t perform that action at this time.
0 commit comments