File tree Expand file tree Collapse file tree
modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ public void testCodeGenWithOneOfDiscriminator31() throws IOException {
185185 for (CodegenProperty var : fruitModel .vars ) {
186186 Assert .assertNotNull (var .name , "var name should not be null" );
187187 Assert .assertNotNull (var .dataType , "var dataType should not be null" );
188- Assert .assertTrue (var .isModel , "var should be a model type" );
188+ Assert .assertTrue (var .isModel , "var " + var . name + " should be a model type (isModel=" + var . isModel + ") " );
189189 Assert .assertFalse (var .isContainer , "var should not be a container (it references a model)" );
190190
191191 // Check expected properties based on discriminator title
@@ -195,6 +195,8 @@ public void testCodeGenWithOneOfDiscriminator31() throws IOException {
195195 Assert .assertEquals (var .dataType , "FloatMap" , "banana_map should reference FloatMap" );
196196 } else if (var .name .equals ("orange_choice" )) {
197197 Assert .assertEquals (var .dataType , "Orange" , "orange_choice should reference Orange" );
198+ } else {
199+ Assert .fail ("Unexpected var name: " + var .name + ". Expected one of: apple_list, banana_map, orange_choice" );
198200 }
199201 }
200202
You can’t perform that action at this time.
0 commit comments