Skip to content

Commit b9e001c

Browse files
committed
add complete test
1 parent 968194e commit b9e001c

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed
Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
package com.fasterxml.jackson.dataformat.protobuf.schema;
22

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
712
{
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+
}
827
}

0 commit comments

Comments
 (0)