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

java-helidon.server.libraries.mp.api_test.mustache Maven / Gradle / Ivy

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

package {{package}};

{{#imports}}import {{import}};
{{/imports}}
import {{rootJavaEEPackage}}.inject.Inject;
import {{rootJavaEEPackage}}.ws.rs.client.WebTarget;

import org.junit.jupiter.api.Test;

import io.helidon.microprofile.tests.junit5.HelidonTest;

import java.net.URL;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 {{#appName}}
 * {{{.}}} Test
 *
 {{/appName}}
 * API tests for {{classname}}
 */
@HelidonTest
public class {{classname}}Test {

    @Inject
    private WebTarget target;

    {{#operations}}{{#operation}}
    /**
     {{#summary}}
     * {{summary}}
     *
     {{#notes}}
     * {{.}}
     *
     {{/notes}}
     {{/summary}}
     * @throws ApiException if the Api call fails
     */
    @Test
    public void {{operationId}}Test() throws Exception {
        // TODO: test validations
        {{#allParams}}
        {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}
        {{/allParams}}
        //{{#returnType}}{{{.}}} response = {{/returnType}}target.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
        //{{#returnType}}assertNotNull(response);{{/returnType}}
    }
    {{/operation}}{{/operations}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy