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

java-micronaut-client.api_test.mustache Maven / Gradle / Ivy

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

{{#imports}}import {{import}};
{{/imports}}
import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions;
import jakarta.inject.Inject;
import reactor.core.publisher.Mono;

{{^fullJavaUtil}}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
{{/fullJavaUtil}}


/**
 * API tests for {{classname}}
 */
@MicronautTest
public class {{classname}}Test {

    @Inject
    {{classname}} api;

    {{#operations}}{{#operation}}
    /**
     * {{summary}}
     {{#notes}}
     *
     * {{notes}}
     {{/notes}}
     */
    @Test
    public void {{operationId}}Test() {
        {{#allParams}}
        {{{dataType}}} {{paramName}} = null;
        {{/allParams}}
        // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).block();
        // {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} asyncResponse = api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
        // TODO: test validations
    }

    {{/operation}}{{/operations}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy