github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/java/model_test.mustache (about) 1 {{>licenseInfo}} 2 3 package {{package}}; 4 5 {{#imports}}import {{import}}; 6 {{/imports}} 7 import org.junit.Assert; 8 import org.junit.Ignore; 9 import org.junit.Test; 10 11 {{#fullJavaUtil}} 12 import java.util.ArrayList; 13 import java.util.HashMap; 14 import java.util.List; 15 import java.util.Map; 16 {{/fullJavaUtil}} 17 18 /** 19 * Model tests for {{classname}} 20 */ 21 public class {{classname}}Test { 22 {{#models}} 23 {{#model}} 24 {{^vendorExtensions.x-is-one-of-interface}} 25 {{^isEnum}} 26 private final {{classname}} model = new {{classname}}(); 27 28 {{/isEnum}} 29 /** 30 * Model tests for {{classname}} 31 */ 32 @Test 33 public void test{{classname}}() { 34 // TODO: test {{classname}} 35 } 36 37 {{#allVars}} 38 /** 39 * Test the property '{{name}}' 40 */ 41 @Test 42 public void {{name}}Test() { 43 // TODO: test {{name}} 44 } 45 46 {{/allVars}} 47 {{/vendorExtensions.x-is-one-of-interface}} 48 {{/model}} 49 {{/models}} 50 }