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

handlebars.Java.libraries.retrofit2.api_test.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
package {{package}};

import {{invokerPackage}}.ApiClient;
{{#imports}}import {{import}};
{{/imports}}
import org.junit.Before;
import org.junit.Test;

{{^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 {{classname}} api;

    @Before
    public void setup() {
        api = new ApiClient().createService({{classname}}.class);
    }

    {{#operations}}
    {{#operation}}
    {{#contents}}
    {{#@first}}

    /**
     * {{summary}}
     *
     * {{notes}}
     */
    @Test
    public void {{operationId}}Test() {
        {{#parameters}}
        {{{dataType}}} {{paramName}} = null;
        {{/parameters}}
        // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#parameters}}{{paramName}}{{#has this 'more'}}, {{/has}}{{/parameters}});

        // TODO: test validations
    }
    {{/@first}}
    {{/contents}}
    {{/operation}}
    {{/operations}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy