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

Eiffel.test.api_test.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
note
    description: "API tests for {{classname}}"
    date: "$Date$"
    revision: "$Revision$"


class {{classname}}_TEST

inherit

    EQA_TEST_SET

feature -- Test routines

{{#operations}}
    {{#operation}}

    test_{{operationId}}
            -- {{summary}}
            --
            -- {{notes}}
        local
            {{#returnType}}
            l_response: {{{.}}}
            {{/returnType}}
            {{#allParams}}
            l_{{paramName}}: {{{dataType}}}
            {{/allParams}}
        do
            -- TODO: Initialize required params.
            {{#allParams}}
            {{#required}}
            {{#isContainer}}
            {{#isArray}}
            -- create {ARRAYED_{{dataType}}} l_{{paramName}}.make (2)
            {{/isArray}}
            {{/isContainer}}
            {{^isContainer}}
            -- l_{{paramName}}
            {{/isContainer}}
            {{/required}}
            {{/allParams}}

            {{#returnType}}
            -- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}
            {{/returnType}}
            {{^returnType}}
            -- api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}
            {{/returnType}}
            assert ("not_implemented", False)
        end
    {{/operation}}
{{/operations}}

feature {NONE} -- Implementation

    api: {{classname}}
            -- Create an object instance of `{{classname}}'.
        once
            create { {{classname}} } Result
        end

end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy