|
15 | 15 | import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
|
16 | 16 | import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchemaLoader;
|
17 | 17 |
|
18 |
| -public class SchemaGenTest extends ProtobufTestBase { |
19 |
| - |
| 18 | +public class SchemaGenTest extends ProtobufTestBase |
| 19 | +{ |
20 | 20 | public static class WithNestedClass {
|
21 | 21 | @JsonProperty(required = true)
|
22 | 22 | public String name;
|
@@ -64,26 +64,13 @@ public static class Employee {
|
64 | 64 | public String[] emails;
|
65 | 65 |
|
66 | 66 | public Employee boss;
|
67 |
| - } |
68 |
| - |
69 |
| - protected RootType buildRootType() { |
70 |
| - RootType rType = new RootType(); |
71 |
| - rType.name = "rTpye"; |
72 |
| - rType.value = 100; |
73 |
| - rType.other = new ArrayList<String>(); |
74 |
| - rType.other.add("12345"); |
75 |
| - rType.other.add("abcdefg"); |
76 |
| - return rType; |
77 |
| - } |
| 67 | + } |
78 | 68 |
|
79 |
| - protected Employee buildEmployee() { |
80 |
| - Employee empl = new Employee(); |
81 |
| - empl.name = "Bobbee"; |
82 |
| - empl.age = 39; |
83 |
| - empl. emails = new String[] { "[email protected]", "[email protected]" }; |
84 |
| - empl.boss = null; |
85 |
| - return empl; |
86 |
| - } |
| 69 | + /* |
| 70 | + /********************************************************** |
| 71 | + /* Test methods |
| 72 | + /********************************************************** |
| 73 | + */ |
87 | 74 |
|
88 | 75 | public void testWithNestedClass() throws Exception {
|
89 | 76 | ObjectMapper mapper = new ObjectMapper(new ProtobufFactory());
|
@@ -186,4 +173,23 @@ public void testSimplePojoGenProtobufSchema() throws Exception {
|
186 | 173 | assertEquals(rType.value, parsedRootType.value);
|
187 | 174 | assertEquals(rType.other, parsedRootType.other);
|
188 | 175 | }
|
| 176 | + |
| 177 | + protected RootType buildRootType() { |
| 178 | + RootType rType = new RootType(); |
| 179 | + rType.name = "rTpye"; |
| 180 | + rType.value = 100; |
| 181 | + rType.other = new ArrayList<String>(); |
| 182 | + rType.other.add("12345"); |
| 183 | + rType.other.add("abcdefg"); |
| 184 | + return rType; |
| 185 | + } |
| 186 | + |
| 187 | + protected Employee buildEmployee() { |
| 188 | + Employee empl = new Employee(); |
| 189 | + empl.name = "Bobbee"; |
| 190 | + empl.age = 39; |
| 191 | + empl. emails = new String[] { "[email protected]", "[email protected]" }; |
| 192 | + empl.boss = null; |
| 193 | + return empl; |
| 194 | + } |
189 | 195 | }
|
0 commit comments