make test invocations compileable #2549

This commit is contained in:
jfiala 2016-11-19 11:55:22 +01:00
parent 89ee2b1c91
commit e4f27bc7a7

View File

@ -1,43 +1,45 @@
{{>licenseInfo}} {{>licenseInfo}}
package {{package}}; package {{package}};
import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiException;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
{{^fullJavaUtil}}
import java.util.ArrayList; {{^fullJavaUtil}}
import java.util.HashMap; import java.util.ArrayList;
import java.util.List; import java.util.HashMap;
import java.util.Map; import java.util.List;
{{/fullJavaUtil}} import java.util.Map;
{{/fullJavaUtil}}
/**
* API tests for {{classname}} /**
*/ * API tests for {{classname}}
public class {{classname}}Test { */
@Ignore
private final {{classname}} api = new {{classname}}(); public class {{classname}}Test {
{{#operations}}{{#operation}} private final {{classname}} api = new {{classname}}();
/**
* {{summary}} {{#operations}}{{#operation}}
* /**
* {{notes}} * {{summary}}
* *
* @throws ApiException * {{notes}}
* if the Api call fails *
*/ * @throws ApiException
@Test * if the Api call fails
public void {{operationId}}Test() throws ApiException { */
{{#allParams}} @Test
{{{dataType}}} {{paramName}} = null; public void {{operationId}}Test() throws ApiException {
{{/allParams}} {{#allParams}}
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{{dataType}}} {{paramName}} = null;
{{/allParams}}
// TODO: test validations {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
}
{{/operation}}{{/operations}} // TODO: test validations
} }
{{/operation}}{{/operations}}
}