-
Notifications
You must be signed in to change notification settings - Fork 14
/
api_test.mustache
51 lines (44 loc) · 1.11 KB
/
api_test.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{{>licenseInfo}}
package {{package}};
import {{invokerPackage}}.ApiException;
{{#imports}}import {{import}};
{{/imports}}
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for {{classname}}
*/
class {{classname}}Test {
private final {{classname}} api = new {{classname}}();
{{#operations}}
{{#operation}}
/**
{{#summary}}
* {{.}}
*
{{/summary}}
{{#notes}}
* {{.}}
*
{{/notes}}
* @throws ApiException
* if the Api call fails
*/
@Test
void {{operationId}}Test() throws ApiException {
//{{#allParams}}
//{{{dataType}}} {{paramName}} = null;
//{{/allParams}}
//{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations
}
{{/operation}}
{{/operations}}
}