All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Java.api_test.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
{{>licenseInfo}}

package {{package}};

import {{invokerPackage}}.ApiException;
{{#imports}}import {{import}};
{{/imports}}
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;

import java.time.LocalDate;
import java.time.OffsetDateTime;
{{^fullJavaUtil}}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

{{/fullJavaUtil}}
/**
 * API tests for {{classname}}
 */
public class {{classname}}Test {

    private final {{classname}} api = new {{classname}}();

    {{#operations}}
    {{#operation}}
    /**
    {{#summary}}
     * {{.}}
     *
    {{/summary}}
    {{#notes}}
     * {{.}}
     *
    {{/notes}}
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public 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}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy