Search in sources :

Example 1 with Input

use of io.kestra.core.models.flows.Input in project kestra by kestra-io.

the class YamlFlowParserTest method inputs.

@Test
void inputs() {
    Flow flow = this.parse("flows/valids/inputs.yaml");
    assertThat(flow.getInputs().size(), is(8));
    assertThat(flow.getInputs().stream().filter(Input::getRequired).count(), is(6L));
    assertThat(flow.getInputs().stream().filter(r -> !r.getRequired()).count(), is(2L));
    assertThat(flow.getInputs().stream().filter(r -> r.getDefaults() != null).count(), is(1L));
}
Also used : Input(io.kestra.core.models.flows.Input) Flow(io.kestra.core.models.flows.Flow) Test(org.junit.jupiter.api.Test) MicronautTest(io.micronaut.test.extensions.junit5.annotation.MicronautTest)

Aggregations

Flow (io.kestra.core.models.flows.Flow)1 Input (io.kestra.core.models.flows.Input)1 MicronautTest (io.micronaut.test.extensions.junit5.annotation.MicronautTest)1 Test (org.junit.jupiter.api.Test)1